@s3bubble/player

0.3.4 • Public • Published

S3Bubble DRM Video Player

S3Bubble Video Player

S3Bubble DRM Audio Waveform Player

S3Bubble Audio Player

npm install @s3bubble/player

BuyDRM Example - Open Website

s3bubble('<div>').drm({
    type: '<video | audio>',
    drm: {
        authenticationXml: '<authenticationXml>',
        widevine: {
            code: '<widevine code>',
            keysystem: 'com.widevine.alpha',
            license: 'https://wv-keyos.licensekeyserver.com/'
        },
        playready: {
            code: '<playready code>',
            keysystem: 'com.microsoft.playready',
            license: 'https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx'
        },
        fairplay: {
            code: '<fairplay code>',
            keysystem: 'com.apple.fps.1_0',
            license: 'https://fp-keyos.licensekeyserver.com/getkey',
            certificate: 'https://00000000000.cloudfront.net/fairplay.cer'
        },
    }
});

EZDRM Example - Open Website

s3bubble('<div>').drm({
    type: '<video | audio>',
    drm: {
        widevine: {
            code: '<widevine code>',
            keysystem: 'com.widevine.alpha',
            license: 'https://widevine-dash.ezdrm.com/widevine-php/widevine-foreignkey.php?pX=000000'
        },
        playready: {
            code: '<playready code>',
            keysystem: 'com.microsoft.playready',
            license: 'https://playready.ezdrm.com/cency/preauth.aspx?pX=000000'
        },
        fairplay: {
            code: '<fairplay code>',
            keysystem: 'com.apple.fps.1_0',
            assetid: '8a450047-23f1-0000-8b58-9fd82cf6362c',
            certificate: 'https://00000000000.cloudfront.net/fairplay.cer'
        },
    }
});

Extra DRM Example

s3bubble('<div>').drm({
    type: '<video | audio>',
    meta: {
        subTitle: '<sub title>',
        title: '<title>',
        para: '<description>',
        showSocial: true,
    },
    tracks: [
        {
            src: '/captions/it.vtt',
            kind: 'captions',
            srclang: 'it',
            label: 'Italian'
        },
        {
            src: '/captions/fr.vtt',
            kind: 'captions',
            srclang: 'fr',
            label: 'French',
            default: true
        },
        {
            src: '/captions/chapters.vtt',
            kind: 'chapters',
            srclang: 'de',
            label: 'German'
        }
    ],
    drm: {
        authenticationXml: '<authenticationXml BuyDRM only>',
        widevine: {
            code: '<widevine code>',
            keysystem: 'com.widevine.alpha',
            license: 'https://<license>.com'
        },
        playready: {
            code: '<playready code>',
            keysystem: 'com.microsoft.playready',
            license: 'https://<license>/rightsmanager.asmx'
        },
        fairplay: {
            code: '<fairplay code>',
            keysystem: 'com.apple.fps.1_0',
            assetid: '<assetid EZDRM only>',
            license: 'https://<license>/getkey',
            certificate: 'https://00000000000.cloudfront.net/fairplay.cer'
        },
    }
}, function(player) {
    // You can listen to any video events here
    player.on('timeupdate', function(event) {
        console.log('event', player.currentTime());
    });
});

Basic Example

s3bubble('<div>').media({
    type: '<audio | video>',
    code: '<code>'
}, function(player) {
    // You can listen to any video events here
    player.on('timeupdate', function(event) {
        console.log('event', player.currentTime());
    });
});

HTML Example

<div class="s3bmedia" data-type="<video|audio>" data-code="<your code>"></div>
<div class="s3bdrm" data-type="<video|audio>" data-widevine="<your widevine code>" data-playready="<your playready code>" data-fairplay="<your fairplay code>" data-assetid="<your fairplay asset id from ezdrm>"></div>

Setup Globals - Player Options Will Override DRM Globals

window.s3bubbleGlobals = {
    preventScreenRecording: true,
    debug: false,
    autoplay: true,
    poweredBy: [{
        href: "https://s3bubble.com",
        label: "Powered by s3bubble.com"
    }, ],
    api: '<api key>',
    locale: 'en', 
    poster: 'https://images.pexels.com/photos/8748734/pexels-photo-8748734.jpeg',
    drm: {
        widevine: {
            keysystem: 'com.widevine.alpha',
            license: 'https://<license>?pX=000000'
        },
        fairplay: {
            keysystem: 'com.apple.fps.1_0',
            license: 'https://<license>.com',
            certificate: 'https://00000000000.cloudfront.net/fairplay.cer'
        },
        playeready: {
            keysystem: 'com.microsoft.playready',
            license: 'https://<license>?pX=000000'
        }
    }
}

Video Tutorial

open demo

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.41latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.41
0.3.31
0.3.20
0.3.10
0.3.00
0.2.90
0.2.80
0.2.70
0.2.50
0.2.40
0.2.30
0.2.20
0.2.10
0.2.00
0.1.90
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @s3bubble/player

Weekly Downloads

2

Version

0.3.4

License

ISC

Unpacked Size

3.23 MB

Total Files

12

Last publish

Collaborators

  • s3bubble