Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update development branch with the latest from dash.js #2

Merged
merged 14 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ When it is all done, it should look similar to this:
* ```npm run doc```

### Troubleshooting
* In case the build process is failing make sure to use an up-to-date node.js version. The build process was successfully tested with node.js version 14.16.1.
* In case the build process is failing make sure to use an up-to-date node.js version. The build process was successfully tested with node.js version 20.10.0.

### License
dash.js is released under [BSD license](https://github.com/Dash-Industry-Forum/dash.js/blob/development/LICENSE.md)
Expand Down
17 changes: 14 additions & 3 deletions build/jsdoc/jsdoc_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"plugins/markdown"
],
"markdown": {
"hardwrap": true
"hardwrap": true,
"idInHeadings": true
},
"templates": {
"cleverLinks": true,
Expand All @@ -21,6 +22,7 @@
"outputSourceFiles": true,
"outputSourcePath": true,
"systemName": "dash.js",
"systemSummary": "",
"copyright": "<h3>DASH Industry Forum</h3>",
"footer": "",
"navType": "horizontal",
Expand All @@ -31,11 +33,20 @@
"highlightTutorialCode": true
},
"opts": {
"template": "../../node_modules/ink-docstrap/template",
"template": "../../node_modules/clean-jsdoc-theme",
"encoding": "utf8",
"recurse": true,
"query": "value",
"private": false,
"lenient": true
"lenient": true,
"verbose": true,
"destination": "docs/",
"theme_opts": {
"default_theme": "light",
"include_css": ["./build/style_jsdoc/jsdoc-custom.css"],
"favicon": "https://dashif.org/img/favicon.ico",
"includeFilesListInHomepage": true,
"homepageTitle": "dash.js API Docs"
}
}
}
18 changes: 18 additions & 0 deletions build/style_jsdoc/jsdoc-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
td, th {
padding: 10px 10px !important;
word-wrap: break-word;
max-width: 50px;
white-space: inherit;
text-overflow: ellipsis;
}

/* Optional: Style the first and last columns differently */
td:nth-child(5), th:nth-child(5) {
max-width: 150px !important;
}
td:first-child, th:first-child {
max-width: 100px !important;
}
.main-wrapper {
padding: 0 !important;
}
2 changes: 1 addition & 1 deletion contrib/akamai/controlbar/ControlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) {
durationDisplay.onclick = seekLive;
durationDisplay.classList.add('live-icon');
}
} else if (!isNaN(value)) {
} else if (!isNaN(value) && isFinite(value)) {
durationDisplay.textContent = displayUTCTimeCodes ? self.player.formatUTC(value) : self.player.convertToTimeCode(value);
durationDisplay.classList.remove('live-icon');
}
Expand Down
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,8 @@ declare namespace dashjs {

getNextSegmentRequest(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null;

repeatSegmentRequest(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null;

getValidTimeCloseToTargetTime(time: number, mediaInfo: MediaInfo, representation: Representation, targetThreshold: number): number;

getValidTimeAheadOfTargetTime(time: number, mediaInfo: MediaInfo, representation: Representation): number;
Expand Down Expand Up @@ -1090,6 +1092,13 @@ declare namespace dashjs {
droppedFramesRule?: boolean,
abandonRequestsRule?: boolean
},
abrRulesParameters?: {
abandonRequestsRule: {
graceTimeThreshold: number,
abandonMultiplier: number,
minLengthToAverage: number
}
},
bandwidthSafetyFactor?: number;
useDefaultABRRules?: boolean;
useDeadTimeLatency?: boolean;
Expand Down
3,805 changes: 2,938 additions & 867 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashjs",
"version": "4.7.2",
"version": "4.7.3",
"description": "A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.",
"author": "Dash Industry Forum",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -62,11 +62,13 @@
"dependencies": {
"bcp-47-match": "^1.0.3",
"bcp-47-normalize": "^1.1.1",
"clean-jsdoc-theme": "^4.2.10",
"codem-isoboxer": "0.3.9",
"es6-promise": "^4.2.8",
"fast-deep-equal": "2.0.1",
"foodoc": "^0.0.9",
"html-entities": "^1.2.1",
"imsc": "^1.1.3",
"imsc": "^1.1.4",
"localforage": "^1.7.1",
"path-browserify": "^1.0.1",
"ua-parser-js": "^1.0.2"
Expand Down
2 changes: 1 addition & 1 deletion samples/ad-insertion/js/scte.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(function() {
var player = dashjs.MediaPlayer().create();
playerAd = dashjs.MediaPlayer().create();
contentUrl = 'https://livesim.dashif.org/livesim/scte35_1/testpic_2s/Manifest.mpd ',
contentUrl = 'https://livesim2.dashif.org/livesim2/scte35_2/testpic_2s/Manifest.mpd',
adUrl = 'https://dash.akamaized.net/fokus/adinsertion-samples/scte/dash.mpd',
currentlyAd = false;

Expand Down
4 changes: 2 additions & 2 deletions samples/advanced/listening-to-SCTE-EMSG-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

<script class="code">
var player;
const mpd = "https://livesim.dashif.org/livesim/scte35_2/testpic_2s/Manifest.mpd";
const SCHEMEIDURI = "urn:scte:scte35:2013:xml";
const mpd = "https://livesim2.dashif.org/livesim2/scte35_2/testpic_2s/Manifest.mpd";
const SCHEMEIDURI = "urn:scte:scte35:2013:bin";
const EVENT_MODE_ON_START = dashjs.MediaPlayer.events.EVENT_MODE_ON_START;
const EVENT_MODE_ON_RECEIVE = dashjs.MediaPlayer.events.EVENT_MODE_ON_RECEIVE;

Expand Down
2 changes: 1 addition & 1 deletion samples/advanced/load-with-starttime.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
function init() {
var video,
player,
url = "https://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd";
url = "https://livesim2.dashif.org/livesim2/testpic_2s/Manifest.mpd";

player = dashjs.MediaPlayer().create();
video = document.querySelector("video");
Expand Down
2 changes: 1 addition & 1 deletion samples/audio-only/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
function init() {
var audio,
player,
url = "https://livesim.dashif.org/dash/vod/testpic_2s/audio.mpd";
url = "https://livesim2.dashif.org/vod/testpic_2s/audio.mpd";

audio = document.querySelector("audio");
player = dashjs.MediaPlayer().create();
Expand Down
2 changes: 1 addition & 1 deletion samples/captioning/cea608.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</style>

<script class="code">
var CAPTION_URL = "https://livesim.dashif.org/dash/vod/testpic_2s/cea608.mpd",
var CAPTION_URL = "https://livesim2.dashif.org/vod/testpic_2s/cea608.mpd",
video,
player;

Expand Down
4 changes: 2 additions & 2 deletions samples/captioning/multi-track-captions.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<script class="code">
var EXTERNAL_CAPTION_URL = "https://dash.akamaized.net/dash264/TestCases/4b/qualcomm/1/ED_OnDemand_5SecSeg_Subtitles.mpd", /* need to manually seek to get stream to start... issue with MPD but only sample with multi adaptations for external sidecar caption text xml */
FRAGMENTED_CAPTION_URL = "https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd",
FRAGMENTED_CAPTION_URL = "https://livesim2.dashif.org/vod/testpic_2s/multi_subs.mpd",
videoElement,
controlbar,
player;
Expand Down Expand Up @@ -172,7 +172,7 @@ <h4>Settings</h4>
<option value="">-- unset initial lang and role --</option>
<option value="en-subtitle">eng - subtitles</option>
<option value="en-caption">eng - captions</option>
<option value="se">swe - subtitles</option>
<option value="sv">swe - subtitles</option>
<option value="qb">qbb - subtitles</option>
<option value="no">nor - subtitles</option>
</select>
Expand Down
5 changes: 0 additions & 5 deletions samples/captioning/ttml-ebutt-sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
</style>

<script class="code">
/* TEST CONTENT.
https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd
https://livesim.dashif.org/dash/vod/testpic_2s/xml_subs.mpd
https://livesim.dashif.org/livesim/testpic_2s/multi_subs.mpd
*/
var CAPTION_URL = "https://rdmedia.bbc.co.uk/elephants_dream/1/client_manifest-all.mpd",
video,
player;
Expand Down
3 changes: 3 additions & 0 deletions samples/dash-if-reference-player/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,9 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
case 'muted':
$scope.muted = this.parseBoolean(value);
$scope.toggleMuted();
if ($scope.muted === true){
document.getElementById('muteBtn')?.click();
}
break;
case 'drmToday':
$scope.drmToday = this.parseBoolean(value);
Expand Down