Created
March 21, 2021 04:00
-
-
Save argentinaluiz/71028c804f4784ec4dab149e2ff03051 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <link href="https://vjs.zencdn.net/7.10.2/video-js.css" rel="stylesheet" /> | |
| <script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js"></script> | |
| </head> | |
| <body> | |
| <video | |
| id="player" | |
| class="video-js" | |
| style="height: 100%; width: 100%" | |
| controls | |
| preload="auto" | |
| data-setup="{}" | |
| ></video> | |
| <script type="text/javascript"> | |
| var video = videojs("player"); | |
| video.eme(); | |
| video.src({ | |
| src: | |
| // "https://s3.amazonaws.com/drmsonus/code/fullcycle/devops_20/01/01_introducao.mp4/stream.mpd", | |
| "https://videos.code.education/code/fullcycle/devops_20/01/01_introducao.mp4/fp/fairplay.m3u8", | |
| //type: "application/dash+xml", | |
| type: 'application/x-mpegURL', | |
| keySystems: { | |
| //"com.widevine.alpha": | |
| // "https://widevine-dash.ezdrm.com/widevine-php/widevine-foreignkey.php?pX=AC398C&customdata=MTQ0OmFyZ2VudGluYWx1aXpAZ21haWwuY29tOjY3MTE6Y291cnNlOmNvZGU=", | |
| "com.apple.fps.1_0": { | |
| certificateUri: | |
| "https://s3.amazonaws.com/sontest-zencoder/fairplay/fairplay.cer", | |
| licenseUri: | |
| "https://fps.ezdrm.com/api/licenses/694e35af-75c3-4d22-8a90-75108b912c34?customdata=MTQ0OmFyZ2VudGluYWx1aXpAZ21haWwuY29tOjY3MTE6Y291cnNlOmNvZGU=", | |
| /*licenseHeaders: { | |
| 'content-type' : 'application/octet-stream' | |
| },*/ | |
| /*getCertificate: function(emeOptions, callback) { | |
| console.log('getCertificate'); | |
| // request certificate | |
| // if err, callback(err) | |
| // if success, callback(null, certificate) | |
| }, | |
| getContentId: function(emeOptions, initData) { | |
| console.log('getContentId'); | |
| // return content ID | |
| }, | |
| getLicense: function(emeOptions, contentId, keyMessage, callback) { | |
| console.log('getLicense'); | |
| // request key | |
| // if err, callback(err) | |
| // if success, callback(null, key) as arraybuffer | |
| }*/ | |
| }, | |
| }, | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment