Skip to content

Commit

Permalink
add dolby tc updated for 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
dong-heun committed Oct 24, 2024
1 parent 9924707 commit ffb94d4
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 2 deletions.
245 changes: 245 additions & 0 deletions dolby/dolby-tc-2025.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
<html>
<head>
<script src="shaka-player.compiled.js"></script>
<script>
var test_cases = [
[],
['1. O_AST-MP4-HLS-dvhe.05-00-23_976 (203)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/P5_DVHE_23976_HLS_MPD/p5_dvhe_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/P5_DVH1_23976_HLS_MPD/p5_dvh1_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.05-00-MPD-HLS-23976/P50_DVHE_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.05-00-MPD-HLS-23976/P50_DVH1_23976.m3u8'],
['2. O_AST-MP4-HLS-dvhe.08-01-23_976 (204)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P81_DVHE_23976_HLS_MPD/p81_dvhe_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P81_DVH1_23976_HLS_MPD/p81_dvh1_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.08-01-MPD-HLS-23976/P81_HEV1_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.08-01-MPD-HLS-23976/P81_HVC1_23976.m3u8'],
['3. O_AST-MP4-HLS-dvhe.08-02-23_976 (205)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/P82_DVHE_23976_HLS_MPD/p82_dvhe_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/P82_DVH1_23976_HLS_MPD/p82_dvh1_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.08-02-MPD-HLS-23976/P82_HEV1_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.08-02-MPD-HLS-23976/P82_HVC1_23976.m3u8'],
['4. O_AST-MP4-HLS-dvhe.08-04-23_976 (206)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.08-04-MPD-HLS-23976/P84_HEV1_23976.m3u8',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.08-04-MPD-HLS-23976/P84_HVC1_23976.m3u8'],
['5. O_AST-MP4-MPD-dvav.09-02-23_976 (207)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P92_DVAV_23976_HLS_MPD/p92_dvav_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P92_DVA1_23976_HLS_MPD/p92_dva1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVAV.09-02-MPD-HLS-23976/P92_AVC3_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVA1.09-02-MPD-HLS-23976/P92_AVC1_23976.mpd'],
['6. O_AST-MP4-MPD-dvhe.05-00-23_976 (208)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/p5/P5_DVHE_23976_HLS_MPD/p5_dvhe_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/p5/P5_DVH1_23976_HLS_MPD/p5_dvh1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.05-00-MPD-HLS-23976/P50_DVHE_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.05-00-MPD-HLS-23976/P50_DVH1_23976.mpd'],
['7. O_AST-MP4-MPD-dvhe.08-01-23_976 (209)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P81_DVHE_23976_HLS_MPD/p81_dvhe_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P81_DVH1_23976_HLS_MPD/p81_dvh1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P81_DVHE_23976_HLS_MPD/p81_dvhe_23976_reversed.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Source_SDK/v2.6/P81_DVH1_23976_HLS_MPD/p81_dvh1_23976_reversed.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.08-01-MPD-HLS-23976/P81_HEV1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.08-01-MPD-HLS-23976/P81_HVC1_23976.mpd'],
['8. O_AST-MP4-MPD-dvhe.08-02-23_976 (210)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/p8.2/P82_DVHE_23976_HLS_MPD/p82_dvhe_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v3.0/p8.2/P82_DVH1_23976_HLS_MPD/p82_dvh1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.08-02-MPD-HLS-23976/P82_HEV1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.08-02-MPD-HLS-23976/P82_HVC1_23976.mpd'],
['9. O_AST-MP4-MPD-dvhe.08-04-23_976 (211)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVHE.08-04-MPD-HLS-23976/P84_HEV1_23976.mpd',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v53/AST-DVH1.08-04-MPD-HLS-23976/P84_HVC1_23976.mpd'],
['10. O_AST-TS-HLS-dvhe.05-00-23_976 (212)',
'https://d9zmmjtv72w5o.cloudfront.net/User/Sink_SDK/v5.3/TS/hls/p5/23fps/Profile5_SSDK_23fps.m3u8'],
[]
];
var player = null;
var serial_no = 0;
var tc_id = 0;

function run_tc(sno, tid) {
serial_no = sno;
tc_id = tid;
loadPlayer();
}

function loadPlayer() {
if (player) {
unloadPlayer(loadPlayer);
return;
}
trace.clearLog();
// Install built-in polyfills to patch browser incompatibilities.
shaka.polyfill.installAll();

// Check to see if the browser supports the basic APIs Shaka needs.
if (!shaka.Player.isBrowserSupported()) {
// This browser does not have the minimum set of APIs we need.
console.error('Browser not supported!');
return;
}

// Create a Player instance.
var video = document.getElementById('player');
player = new shaka.Player(video);

// Attach player to the window to make it easy to access in the JS console.
window.player = player;

// Listen for error events.
player.addEventListener('error', onErrorEvent);
var uri = test_cases[serial_no][tc_id];
// Try to load a manifest.
// This is an asynchronous process.

player.configure({
restrictions: {
minWidth: 640,
maxWidth: 1920
}
});

player.load(uri).then(function() {
// This runs if the asynchronous load is successful.
console.log('The video has now been loaded!');
}).catch(onError); // onError is executed if the asynchronous load fails.

document.getElementById('title').innerHTML = test_cases[serial_no][0] + " TC" + tc_id + " (shaka-player:" + shaka.Player.version + ")";
document.getElementById('mpd').innerHTML = uri;
}

function onErrorEvent(event) {
// Extract the shaka.util.Error object from the event.
console.log("onErrorEvent");
onError(event.detail);
}

function onError(error) {
// Log the error.
console.error('Error code', error.code, 'object', error);
trace.log('Error code', error.code, 'object', error);
}

function unloadPlayer(callback) {
window.player.destroy().then(function() {
player = null;
if (callback) callback();
}).catch(function(error) {
console.error("destroy error" + error);
});
}

</script>
</head>
<body style="background-color:white;margin:20px">
<h1 id="title">Dolby OTT AST test cases 2025</h1>
<div id="mpd" style="font-size:24px;"></div>
<div id="video" style="position:absolute;top:400;left:1250;width:640;height:360;">
<video id="player" width='100%' height='100%'>
</div>
<div id="output" class="output">
<pre style="font-size:22px;" id="info"></pre>
<pre style="font-size:20px;" id="log"></pre>
</div>
<div style="position:absolute;top:450;font-size:22px;">
1. O_AST-MP4-HLS-dvhe.05-00-23_976 (203)</br>
<a href="#" onclick="run_tc(1,1)" type="button">Test vector 1 (fourCC: dvhe)</a> |
<a href="#" onclick="run_tc(1,2)" type="button">Test vector 2 (fourCC: dvh1)</a> |
<a href="#" onclick="run_tc(1,3)" type="button">Test vector 3 (fourCC: dvhe)</a> |
<a href="#" onclick="run_tc(1,4)" type="button">Test vector 4 (fourCC: dvh1)</a> </br>
2. O_AST-MP4-HLS-dvhe.08-01-23_976 (204)</br>
<a href="#" onclick="run_tc(2,1)" type="button">Test vector 1 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(2,2)" type="button">Test vector 2 (fourCC: hvc1)</a> |
<a href="#" onclick="run_tc(2,3)" type="button">Test vector 3 (fourCC: hev1->dvhe)</a> |
<a href="#" onclick="run_tc(2,4)" type="button">Test vector 4 (fourCC: hvc1->dvh1)</a> </br>
3. O_AST-MP4-HLS-dvhe.08-02-23_976 (205)</br>
<a href="#" onclick="run_tc(3,1)" type="button">Test vector 1 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(3,2)" type="button">Test vector 2 (fourCC: hvc1)</a> |
<a href="#" onclick="run_tc(3,3)" type="button">Test vector 3 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(3,4)" type="button">Test vector 4 (fourCC: hvc1)</a> </br>
4. O_AST-MP4-HLS-dvhe.08-04-23_976 (206)</br>
<a href="#" onclick="run_tc(4,1)" type="button">Test vector 1 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(4,2)" type="button">Test vector 2 (fourCC: hvc1)</a> </br>
5. O_AST-MP4-MPD-dvav.09-02-23_976 (207)</br>
<a href="#" onclick="run_tc(5,1)" type="button">Test vector 1 (fourCC: dvav)</a> |
<a href="#" onclick="run_tc(5,2)" type="button">Test vector 2 (fourCC: dva1)</a> |
<a href="#" onclick="run_tc(5,3)" type="button">Test vector 3 (fourCC: dvav)</a> |
<a href="#" onclick="run_tc(5,4)" type="button">Test vector 4 (fourCC: dva1)</a> </br>
6. O_AST-MP4-MPD-dvhe.05-00-23_976 (208)</br>
<a href="#" onclick="run_tc(6,1)" type="button">Test vector 1 (fourCC: dvhe)</a> |
<a href="#" onclick="run_tc(6,2)" type="button">Test vector 2 (fourCC: dvh1)</a> |
<a href="#" onclick="run_tc(6,3)" type="button">Test vector 3 (fourCC: dvhe)</a> |
<a href="#" onclick="run_tc(6,4)" type="button">Test vector 4 (fourCC: dvh1)</a> </br>
7. O_AST-MP4-MPD-dvhe.08-01-23_976 (209)</br>
<a href="#" onclick="run_tc(7,1)" type="button">Test vector 1 (hev1->dvhe)</a> |
<a href="#" onclick="run_tc(7,2)" type="button">Test vector 2 (hvc1->dvh1)</a> |
<a href="#" onclick="run_tc(7,3)" type="button">Test vector 3 (dvhe->hev1)</a> |
<a href="#" onclick="run_tc(7,4)" type="button">Test vector 4 (dvh1->hvc1)</a> |
<a href="#" onclick="run_tc(7,5)" type="button">Test vector 5 (fourCC: hev1->dvhe)</a> |
<a href="#" onclick="run_tc(7,6)" type="button">Test vector 6 (fourCC: hvc1->dvh1)</a> </br>
8. O_AST-MP4-MPD-dvhe.08-02-23_976 (210)</br>
<a href="#" onclick="run_tc(8,1)" type="button">Test vector 1 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(8,2)" type="button">Test vector 2 (fourCC: hvc1)</a> |
<a href="#" onclick="run_tc(8,3)" type="button">Test vector 3 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(8,4)" type="button">Test vector 4 (fourCC: hvc1)</a> </br>
9. O_AST-MP4-MPD-dvhe.08-04-23_976 (211)</br>
<a href="#" onclick="run_tc(9,1)" type="button">Test vector 1 (fourCC: hev1)</a> |
<a href="#" onclick="run_tc(9,2)" type="button">Test vector 2 (fourCC: hvc1)</a> </br>
10. O_AST-TS-HLS-dvhe.05-00-23_976 (212)</br>
<a href="#" onclick="run_tc(10,1)" type="button">Test vector</a> </br>
<!-- reload -->
</br>
<a href="#" onclick="location.reload()" type="button">Reload Test Page</a> </br>
</div>
<script>
var trace = {
log: function() {
var line = Array.prototype.slice.call(arguments).map(function(argument) {
return typeof argument === 'string' ? argument : JSON.stringify(argument);
}).join(' ');

var total_lines = (document.querySelector('#log').textContent.match(/\n/g) || '').length + 1;
if (total_lines > 11)
document.querySelector('#log').textContent = '';

document.querySelector('#log').textContent = line + '\n' + document.querySelector('#log').textContent;
},

clearLog: function() {
document.querySelector('#log').textContent = '';
},
};

function timeupdate_handler() {
document.querySelector('#info').textContent = "currentTime: " + document.querySelector('#player').currentTime;
}

function event_handler(event) {
trace.log(event.type);
}

function addEventsHandler() {
var mediaevent_ = ["loadstart","suspend","abort","emptied","stalled",
"loadedmetadata","loadeddata","canplay","canplaythrough",
"playing","waiting","seeking","seeked","ended","durationchange",
"play","pause","ratechange","volumechange"];
var i = 0;
do {
var keyname = mediaevent_[i++];
document.querySelector('#player').addEventListener(keyname, event_handler, false);
} while (i < mediaevent_.length);
}

function load() {
document.querySelector('#player').setAttribute("autoplay", "");
document.querySelector('#player').setAttribute("controls", "");
document.querySelector('#player').addEventListener("timeupdate", timeupdate_handler);
addEventsHandler();
}

function play() {
document.querySelector('#player').play();
}

load();
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion dolby/dolby-tc.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@

function unloadPlayer(callback) {
window.player.destroy().then(function() {
if (callback) callback();
player = null;
if (callback) callback();
}).catch(function(error) {
console.error("destroy error" + error);
});
Expand Down
2 changes: 1 addition & 1 deletion dolby/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@

function unloadPlayer(callback) {
window.player.destroy().then(function() {
if (callback) callback();
player = null;
if (callback) callback();
}).catch(function(error) {
console.error("destroy error" + error);
});
Expand Down

0 comments on commit ffb94d4

Please sign in to comment.