314 lines
9.4 KiB
HTML
Executable File
314 lines
9.4 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html style="width: 100vw; height: 100vh; margin: 0; padding: 0; background: #000; overflow: hidden;">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
<meta name="description" content="Tizen Mobile Web Basic Template" />
|
|
<title>Tizen Mobile Web Basic Application</title>
|
|
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>
|
|
<script language="JavaScript" src="https://mule.jwrk.org/distribution/vokaPlayer.global.js"></script>
|
|
</head>
|
|
<body style="width: 100vw; height: 100vh; margin: 0; padding: 0; background: #000; overflow: hidden;">
|
|
<div id="my-video"></div>
|
|
</body>
|
|
|
|
<script language="JavaScript">
|
|
window.addEventListener('load', () => {
|
|
tizen.tvinputdevice.registerKey('MediaPlayPause');
|
|
tizen.tvinputdevice.registerKey('MediaRewind');
|
|
tizen.tvinputdevice.registerKey('MediaFastForward');
|
|
tizen.tvinputdevice.registerKey('MediaPlay');
|
|
tizen.tvinputdevice.registerKey('MediaPause');
|
|
tizen.tvinputdevice.registerKey('MediaStop');
|
|
tizen.tvinputdevice.registerKey('MediaTrackPrevious');
|
|
tizen.tvinputdevice.registerKey('MediaTrackNext');
|
|
tizen.tvinputdevice.registerKey('ArrowRight');
|
|
tizen.tvinputdevice.registerKey('ArrowLeft');
|
|
});
|
|
|
|
var player = spbtvplayer('my-video',
|
|
|
|
// {
|
|
// "features": {
|
|
// "api": false,
|
|
// "drm": true,
|
|
// "ads": true,
|
|
// "heartbeat": false,
|
|
// "metrics": true
|
|
// },
|
|
// "apiConfig": {
|
|
// "clientId": null,
|
|
// "channelId": null,
|
|
// "movieId": null,
|
|
// "episodeId": null,
|
|
// "newsId": null,
|
|
// "apiHost": null,
|
|
// "urlGetParams": null
|
|
// },
|
|
// "uiConfig": {
|
|
// "initAsLive": false,
|
|
// "focusAtInit": false,
|
|
// "focusReasons": {
|
|
// "playPause": false,
|
|
// "buttonClick": true,
|
|
// "fullscreenChange": true
|
|
// },
|
|
// "autoshowToolbox": false,
|
|
// "emptyPoster": false,
|
|
// "waitingPoster": false,
|
|
// "hideControls": true
|
|
// },
|
|
// "adConfig": {
|
|
// "adInfo": true,
|
|
// "adNotification": "Ads allow us to show this video legally and free",
|
|
// "topLine": null,
|
|
// "bottomLine": null,
|
|
// "minAdHeight": 225,
|
|
// "adjustFontSize": true,
|
|
// "precacheVAST": false,
|
|
// "initCountdown": true,
|
|
// "showDisableAds": true,
|
|
// "autoPause": false,
|
|
// "autoResume": false,
|
|
// "showMarkers": true,
|
|
// "debugLogs": false,
|
|
// "disableVPAID": false,
|
|
// "delayImpressions": false
|
|
// },
|
|
// "controls": {
|
|
// "contextMenu": {
|
|
// "enable": false
|
|
// },
|
|
// "prevButton": {
|
|
// "availability": null,
|
|
// "action": null
|
|
// },
|
|
// "nextButton": {
|
|
// "availability": null,
|
|
// "action": null
|
|
// },
|
|
// "rewindButton": {
|
|
// "enable": true,
|
|
// "amount": 30
|
|
// },
|
|
// "forwardButton": {
|
|
// "enable": true,
|
|
// "amount": 30
|
|
// },
|
|
// "zoomButton": {
|
|
// "enable": false,
|
|
// "isVisible": false
|
|
// },
|
|
// "qualityMenu": {
|
|
// "showBitrate": true,
|
|
// "showWidth": false
|
|
// },
|
|
// "editing": {
|
|
// "enable": false
|
|
// },
|
|
// "largePlayButton": false,
|
|
// "bufferingSpinner": false,
|
|
// "continueWatching": {
|
|
// "enable": true,
|
|
// "timeout": 15,
|
|
// "init": null,
|
|
// "destroy": null
|
|
// },
|
|
// "startOver": {
|
|
// "enable": true,
|
|
// "timeout": 15,
|
|
// "init": null,
|
|
// "destroy": null
|
|
// },
|
|
// "nextPopup": {
|
|
// "enable": true,
|
|
// "timeout": 15,
|
|
// "init": null,
|
|
// "destroy": null,
|
|
// "tick": null
|
|
// },
|
|
// "previewPopup": {
|
|
// "imageCallback": null
|
|
// },
|
|
// "logoButton": {
|
|
// "toolbar": {
|
|
// "enable": false,
|
|
// "icon": null,
|
|
// "title": null,
|
|
// "clickUrl": null
|
|
// },
|
|
// "player": {
|
|
// "enable": false,
|
|
// "position": "topright",
|
|
// "icon": null,
|
|
// "title": null,
|
|
// "clickUrl": null,
|
|
// "initialPause": 0,
|
|
// "showDuration": 0,
|
|
// "pauseBetween": 0,
|
|
// "showCount": 0
|
|
// }
|
|
// }
|
|
// },
|
|
// "hotKeys": {},
|
|
// "playback": {
|
|
// "autoNext": false,
|
|
// "getChromecastMediaInfo": null,
|
|
// "supportTimeshift": true,
|
|
// "forceHttpsWhenMixed": false,
|
|
// "delayedLoad": false,
|
|
// "prePlayVideoElement": false
|
|
// },
|
|
// "timeNotify": {
|
|
// "stream": [
|
|
// {
|
|
// "time": null,
|
|
// "id": null
|
|
// }
|
|
// ],
|
|
// "wall": [
|
|
// {
|
|
// "time": null,
|
|
// "id": null
|
|
// }
|
|
// ]
|
|
// },
|
|
// "codecs": {
|
|
// "h264": true,
|
|
// "h265": false,
|
|
// "vp9": false,
|
|
// "av1": false
|
|
// },
|
|
// "tweaks": {
|
|
// "forceNative": null,
|
|
// "forceHls": false,
|
|
// "resumeReloadsLive": false
|
|
// },
|
|
// "debug": {
|
|
// "playerLogs": false
|
|
// },
|
|
// "startupUrl": {
|
|
// "dash": null,
|
|
// "hls": null,
|
|
// "mss": null
|
|
// },
|
|
// "globalOpts": {},
|
|
// "streamOpts": {
|
|
// "autoplay": false
|
|
// },
|
|
// "log": true,
|
|
// "loggerId": 1025
|
|
// }
|
|
|
|
|
|
{
|
|
log: true,
|
|
features: {
|
|
api: true,
|
|
drm: false,
|
|
metrics: true
|
|
},
|
|
apiConfig: {
|
|
channelId: 'tizen-test-app',
|
|
urlGetParams: null,
|
|
clientId: null,
|
|
movieId: null,
|
|
episodeId: null,
|
|
newsId: null,
|
|
apiHost: 'https://mule.jwrk.org',
|
|
},
|
|
uiConfig: {
|
|
initAsLive: true
|
|
},
|
|
globalOpts: {
|
|
uiLanguage: 'ru'
|
|
},
|
|
streamOpts: {
|
|
autoplay: true
|
|
},
|
|
controls: {
|
|
externalSubtitles: {
|
|
url: "https://raw.githubusercontent.com/videojs/video.js/c7298d40a4632a6e9dfcd5a2f5cc3bbe92a78744/docs/examples/elephantsdream/captions.ru.vtt",
|
|
lang: 'ru'
|
|
},
|
|
zoomButton: {
|
|
isVisible: true,
|
|
enable: true,
|
|
},
|
|
editing: {
|
|
enable: true,
|
|
},
|
|
},
|
|
}
|
|
);
|
|
player.afterInitialize(() => {
|
|
console.log("Initialized")
|
|
player.setControlbarVisibility(true)
|
|
// player.mute()
|
|
// player.setVolume(0)
|
|
// player.attachSource("https://livesim2.dashif.org/livesim2/ato_10/testpic_2s/Manifest.mpd",
|
|
// player.attachSource("https://streaming-iptv.voka.tv/eyJvc19uYW1lIjoibWFjIG9zIiwidXNlcl91aWQiOiIzMDE4ZmM2Yi02YmY4LTQ4OGQtOGRhMi02YjZmNWFmMjFjNDQiLCJkYXRhY2VudGVyIjoiaW50IiwiZG9tYWluX25hbWUiOiJzdHJlYW1pbmctaXB0di52b2thLnR2IiwiZHJtIjoic3BidHZjYXMiLCJleHBpcmF0aW9uX2RhdGUiOiIyMDI1LTA4LTE0VDE2OjQ1OjE1WiIsImlwX2FkZHJlc3MiOiI4OS4xMTAuMTIyLjE3NSIsInByb2plY3QiOiJ2b2thX3Byb2R1Y3Rpb24iLCJwcm90b2NvbCI6ImRhc2giLCJzZXNzaW9uX2lkIjoiYWVlYWZhNDItMzA0ZS00M2FiLWE0YmEtODE2M2RjOGEzY2MyIiwic3RyZWFtX25hbWUiOiJQVFpjUGhycE0zemNDM0N0bUZaaVRHZGJMbkhqSDZQZFIiLCJzdHJlYW1fcGF0aCI6Ii92b2RfdjUvdmVsY29tIn0%3D/MCwCFApJgHkwW9dptXANGLrg6QdOGmY_AhRW2SMZBxmBNvd5kOS85GwaIvrCPg%3D%3D/vod_v5/velcom/PTZcPhrpM3zcC3CtmFZiTGdbLnHjH6PdR.mpd?b_app_channel_id=07497ccf-fa3f-473e-a254-9cfdba769ddb&b_app_id=voka_production&b_device_platform=mac%20os&b_device_uid=1d866e05-b0e5-e943-f49c-295ac85c20d7&b_stream_sid=aeeafa42-304e-43ab-a4ba-8163dc8a3cc2&b_strmr_channel_id=PTZcPhrpM3zcC3CtmFZiTGdbLnHjH6PdR",
|
|
// {
|
|
// "autoplay": "true",
|
|
// "drmConfig": true,
|
|
// "metrics": true,
|
|
// "heartbeat": null,
|
|
// "externalSubtitles": null
|
|
// })
|
|
})
|
|
|
|
player.addEventListener('play', onPlay, window)
|
|
player.addEventListener('pause', onPause, window)
|
|
player.addEventListener('canplay', onCanPlay, window)
|
|
player.addEventListener('controlbarShow', onControlsShow, window)
|
|
player.addEventListener('controlbarHide', oncontrolsHide, window)
|
|
player.addEventListener('timeupdate', (e) => console.log("timeupdate", e), window)
|
|
|
|
function onPlay() { console.log("on PLAY") }
|
|
|
|
function onPause() { console.log("on PAUSE") }
|
|
|
|
function onCanPlay() { console.log("on CANPLAY") }
|
|
|
|
function onControlsShow() { console.log("on onControlsShow") }
|
|
|
|
function oncontrolsHide() { console.log("on oncontrolsHide") }
|
|
|
|
function controlBarHide() {
|
|
player.setControlbarVisibility(false)
|
|
}
|
|
|
|
function controlBarShow() {
|
|
player.setControlbarVisibility(true)
|
|
}
|
|
|
|
function changeQualityAuto() {
|
|
player.setSelectedVideoQuality(-1)
|
|
}
|
|
|
|
function changeQualityLowest() {
|
|
player.setSelectedVideoQuality(0)
|
|
}
|
|
|
|
function changeQualityBest() {
|
|
var quality = player.getVideoQualityList()
|
|
player.setSelectedVideoQuality(quality.length - 1)
|
|
}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
/*
|
|
if (webapis.avplay) {
|
|
webapis.avplay.setListener(listener);
|
|
webapis.avplay.open('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8');
|
|
webapis.avplay.prepare();
|
|
webapis.avplay.play();
|
|
}
|
|
*/
|
|
</script>
|
|
|
|
</html>
|