{"id":18411394,"url":"https://github.com/alfg/widevine","last_synced_at":"2025-04-07T11:31:41.885Z","repository":{"id":53591396,"uuid":"94670663","full_name":"alfg/widevine","owner":"alfg","description":"Golang Client for Widevine Cloud","archived":false,"fork":false,"pushed_at":"2022-12-06T14:59:27.000Z","size":114,"stargazers_count":68,"open_issues_count":3,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-22T17:01:47.551Z","etag":null,"topics":["dash","digital","drm","go","golang","media","rights","video","widevine"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/alfg/widevine","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alfg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-18T06:57:18.000Z","updated_at":"2025-03-15T22:35:47.000Z","dependencies_parsed_at":"2023-01-23T08:45:19.294Z","dependency_job_id":null,"html_url":"https://github.com/alfg/widevine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fwidevine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fwidevine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fwidevine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fwidevine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfg","download_url":"https://codeload.github.com/alfg/widevine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247644112,"owners_count":20972223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dash","digital","drm","go","golang","media","rights","video","widevine"],"created_at":"2024-11-06T03:36:47.241Z","updated_at":"2025-04-07T11:31:41.581Z","avatar_url":"https://github.com/alfg.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Widevine\nGolang Client API for Widevine Cloud.\n\nhttps://godoc.org/github.com/alfg/widevine\n\n[![Build Status](https://travis-ci.org/alfg/widevine.svg?branch=master)](https://travis-ci.org/alfg/widevine) [![Build status](https://ci.appveyor.com/api/projects/status/n06qc97gthx38dtt?svg=true)](https://ci.appveyor.com/project/alfg/widevine) [![GoDoc](https://godoc.org/github.com/alfg/widevine?status.svg)](https://godoc.org/github.com/alfg/widevine)  \n\n\n## Install\n```\ngo get github.com/alfg/widevine\n```\n\n## Usage\n\n#### Generating license keys\n```golang\n// Set Widevine options and create instance.\noptions := widevine.Options{\n    Key:      []byte{key},     // Your Widevine Key as a byte array.\n    IV:       []byte{iv},      // Your Widevine IV as a byte array.\n    Provider: \"widevine_test\", // Your Widevine Provider/Portal.\n}\n\n// Create the Widevine instance.\nwv := widevine.New(options)\n\n// Your video content ID, usually a GUID.\ncontentID := \"testing\"\n\n// Set policy options.\npolicy := widevine.Policy{\n    ContentID: contentID,\n    Tracks:    []string{\"SD\", \"HD\", \"AUDIO\"},\n    DRMTypes:  []string{\"WIDEVINE\"},\n    Policy:    \"default\",\n}\n\n// Make the request to generate or get a content key.\nresp := wv.GetContentKey(contentID, policy)\n\n// Response data from Widevine Cloud.\nfmt.Println(\"status: \", resp.Status)\nfmt.Println(\"drm: \", resp.DRM)\nfor _, v := range resp.Tracks {\n    fmt.Println(\"key_id: \", v.KeyID)\n    fmt.Println(\"type: \", v.Type)\n    fmt.Println(\"drm_type: \", v.PSSH[0].DRMType)\n    fmt.Println(\"data: \", v.PSSH[0].Data)\n}\nfmt.Println(\"already_used: \", resp.AlreadyUsed)\n```\n\n#### License Proxy\nYou can also use this package to create a license proxy.\n\nSee: [examples/proxy](/examples/proxy)\n\n\n## Examples\nSee: [examples](/examples)\n\n## Develop\nTODO\n\n`protoc.exe --go_out=. *.proto`\n\n## TODO\n* External Keys\n* Custom PSSH API\n* Tests\n* More error handling\n* Implement more Widevine features\n\n## Resources\n* https://www.widevine.com/news\n* https://integration.widevine.com/\n* https://developers.google.com/protocol-buffers/\n* https://github.com/google/shaka-player\n* https://support.google.com/widevine/answer/6048495?hl=en\n* https://www.widevine.com/contact for Widevine documents (now restricted to licensees)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fwidevine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfg%2Fwidevine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fwidevine/lists"}