Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/Dash-Industry-Forum/…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Jul 25, 2022
2 parents 826aa71 + 97b58a8 commit a621b4a
Show file tree
Hide file tree
Showing 45 changed files with 977 additions and 452 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml
Expand Up @@ -69,14 +69,14 @@ commands:
protocol:
default: "https"
type: string
streams:
default: "all"
groupname:
default: ""
type: string
steps:
- run:
name: Run functional tests (<<parameters.browser>> / <<parameters.protocol>>) <<parameters.streams>>
name: Run functional tests (<<parameters.browser>> / <<parameters.protocol>>) <<parameters.groupname>>
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=<<parameters.browser>> --protocol=<<parameters.protocol>> --streams="<<parameters.streams>>"
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=<<parameters.browser>> --protocol=<<parameters.protocol>> --groupname="<<parameters.groupname>>"
jobs:
build-and-unit-test:
executor: dashjs-executor
Expand Down Expand Up @@ -142,11 +142,11 @@ jobs:
steps:
- functional_steps
- run_test_suite:
streams: VOD (Static MPD)
groupname: VOD (Static MPD)
- run_test_suite:
streams: LIVE (Dynamic MPD)
groupname: LIVE (Dynamic MPD)
- run_test_suite:
streams: Live Low Latency
groupname: Live Low Latency
- store_test_results:
path: test/functional/reports

Expand All @@ -155,9 +155,9 @@ jobs:
steps:
- functional_steps
- run_test_suite:
streams: DRM (modern)
groupname: DRM (modern)
- run_test_suite:
streams: DRM Content (conservative/legacy)
groupname: DRM Content (conservative/legacy)
- store_test_results:
path: test/functional/reports

Expand All @@ -166,13 +166,13 @@ jobs:
steps:
- functional_steps
- run_test_suite:
streams: Subtitles and Captions
groupname: Subtitles and Captions
- run_test_suite:
streams: Thumbnails
groupname: Thumbnails
- run_test_suite:
streams: Audio-only
groupname: Audio-only
- run_test_suite:
streams: Smooth Streaming
groupname: Smooth Streaming

- store_test_results:
path: test/functional/reports
Expand Down
4 changes: 2 additions & 2 deletions build/jsdoc/README.md
Expand Up @@ -5,11 +5,11 @@

### Install Dependencies
1. [install grunt-jsdoc](https://www.npmjs.org/package/grunt-jsdoc-plugin)
* npm install grunt-jsdoc-plugin
* `npm install jsdoc`

### Build JSDocs only
```
grunt jsdoc
npm run doc
```


Expand Down
37 changes: 21 additions & 16 deletions build/jsdoc/jsdoc_conf.json
Expand Up @@ -3,27 +3,32 @@
"allowUnknownTags": true
},
"source": {
"include": ["./src/", "README.md"]
"include": [
"./src/",
"README.md"
]
},
"plugins": [ "plugins/markdown" ],
"plugins": [
"plugins/markdown"
],
"markdown": {
"hardwrap": true
},
"templates": {
"cleverLinks" : true,
"monospaceLinks" : true,
"dateFormat" : "ddd MMM Do YYYY",
"outputSourceFiles" : true,
"outputSourcePath" : true,
"systemName" : "Dash JS",
"copyright" : "<h3>Dash.js <a href=\"http://gruntjs.com/\"><img src=\"https://gruntjs.com/cdn/builtwith.png\" alt=\"Built with Grunt\"></a></h3>",
"footer" : "",
"navType" : "horizontal",
"theme" : "spacelab",
"linenums" : true,
"collapseSymbols" : false,
"inverseNav" : true,
"highlightTutorialCode" : true
"cleverLinks": true,
"monospaceLinks": true,
"dateFormat": "ddd MMM Do YYYY",
"outputSourceFiles": true,
"outputSourcePath": true,
"systemName": "dash.js",
"copyright": "<h3>DASH Industry Forum</h3>",
"footer": "",
"navType": "horizontal",
"theme": "spacelab",
"linenums": true,
"collapseSymbols": true,
"inverseNav": true,
"highlightTutorialCode": true
},
"opts": {
"template": "../../node_modules/ink-docstrap/template",
Expand Down
6 changes: 4 additions & 2 deletions index.d.ts
Expand Up @@ -155,6 +155,7 @@ declare namespace dashjs {
applyServiceDescription?: boolean,
cacheInitSegments?: boolean,
eventControllerRefreshDelay?: number,
enableManifestDurationMismatchFix?: boolean,
capabilities?: {
filterUnsupportedEssentialProperties?: boolean,
useMediaCapabilitiesApi?: boolean
Expand Down Expand Up @@ -363,7 +364,7 @@ declare namespace dashjs {
export type TrackSelectionFunction = (tracks: MediaInfo[]) => MediaInfo[];

export interface MediaPlayerClass {
initialize(view?: HTMLElement, source?: string, autoPlay?: boolean): void;
initialize(view?: HTMLElement, source?: string, autoPlay?: boolean, startTime?: number | string): void;

on(type: AstInFutureEvent['type'], listener: (e: AstInFutureEvent) => void, scope?: object): void;

Expand Down Expand Up @@ -450,7 +451,7 @@ declare namespace dashjs {

attachView(element: HTMLElement): void;

attachSource(urlOrManifest: string | object): void;
attachSource(urlOrManifest: string | object, startTime?: number | string): void;

isReady(): boolean;

Expand Down Expand Up @@ -747,6 +748,7 @@ declare namespace dashjs {
PLAYBACK_STALLED: 'playbackStalled';
PLAYBACK_STARTED: 'playbackStarted';
PLAYBACK_TIME_UPDATED: 'playbackTimeUpdated';
PLAYBACK_VOLUME_CHANGED: 'playbackVolumeChanged';
PLAYBACK_WAITING: 'playbackWaiting';
PROTECTION_CREATED: 'public_protectioncreated';
PROTECTION_DESTROYED: 'public_protectiondestroyed';
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "dashjs",
"version": "4.4.0",
"version": "4.4.1",
"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
2 changes: 1 addition & 1 deletion samples/advanced/listening-to-SCTE-EMSG-events.html
Expand Up @@ -32,7 +32,7 @@

function init() {
player = dashjs.MediaPlayer().create();
player.updateSettings({ 'debug': { 'logLevel': dashjs.Debug.LOG_LEVEL_NONE }});
player.updateSettings({ 'debug': { 'logLevel': dashjs.Debug.LOG_LEVEL_DEBUG }});
player.on(SCHEMEIDURI, showStartEvent, null); /* Default mode is onStart, no need to specify a mode */
player.on(SCHEMEIDURI, showReceiveEvent, null, { mode: EVENT_MODE_ON_RECEIVE });
player.initialize(document.querySelector("video"), URL, true);
Expand Down
99 changes: 99 additions & 0 deletions samples/advanced/load-with-starttime.html
@@ -0,0 +1,99 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Manual load with start time</title>

<script src="../../dist/dash.all.debug.js"></script>

<!-- Bootstrap core CSS -->
<link href="../lib/bootstrap/bootstrap.min.css" rel="stylesheet">
<link href="../lib/main.css" rel="stylesheet">

<style>
video {
width: 640px;
height: 360px;
}
</style>

<script class="code">
function init() {
var video,
player,
url = "https://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd";

player = dashjs.MediaPlayer().create();
video = document.querySelector("video");
player.initialize(); /* initialize the MediaPlayer instance */

player.updateSettings({
debug: {
logLevel: 4
}
});
const starttime = new Date().getTime() / 1000 - 60;
player.attachView(video); /* tell the player which videoElement it should use */
player.attachSource(url, `posix:${starttime}`); /* start from UTC time */
/* player.attachSource(url, starttime); start relative to AST */
}
</script>
</head>
<body>

<main>
<div class="container py-4">
<header class="pb-3 mb-4 border-bottom">
<img class=""
src="../lib/img/dashjs-logo.png"
width="200">
</header>
<div class="row">
<div class="col-md-4">
<div class="h-100 p-5 bg-light border rounded-3">
<h3>Manual load with start time</h3>
<p>A sample showing how to initialize playback at a specific start time.
<ul>
<li>For VoD content the start time is relative to the start time of the first period.</li>
<li>For live content
<ul>
<li>If the parameter starts from prefix
posix: it signifies the absolute time range defined in seconds of Coordinated
Universal Time
(ITU-R TF.460-6). This is the number of seconds since 01-01-1970 00:00:00 UTC.
Fractions of
seconds may be optionally specified down to the millisecond level.
</li>
<li>If no posix prefix is used the starttime is relative to MPD@availabilityStartTime</li>
</ul>
</li>
</ul>
</p>
<p>In this example playback starts 60 seconds from the current wall clock time.
</p>
</div>
</div>
<div class="col-md-8">
<video controls="true"></video>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div id="code-output"></div>
</div>
</div>
<footer class="pt-3 mt-4 text-muted border-top">
&copy; DASH-IF
</footer>
</div>
</main>


<script>
document.addEventListener('DOMContentLoaded', function () {
init();
});
</script>
<script src="../highlighter.js"></script>
</body>
</html>
70 changes: 35 additions & 35 deletions samples/captioning/multi-track-captions.html
Expand Up @@ -157,43 +157,43 @@ <h3>Multiple Language Timed Text Sample</h3>
<div class="col-md-6">
<div class="p-5 border rounded-3">
<h4>Settings</h4>
<div class="settings">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="textDefaultEnabled" onchange="setTextDefaultEnabled()" checked>
<label class="form-check-label" for="textDefaultEnabled">
textDefaultEnabled
</label>
</div>
<div>
<label class="form-check-label" for="textSettings">
Initial settings language/role
</label>
<select class="form-select" onchange="setLang()" aria-label="Default select example" id="textSettings">
<option value="">-- unset initial lang and role --</option>
<option value="eng-subtitle">eng - subtitles</option>
<option value="eng-caption">eng - captions</option>
<option value="swe">swe - subtitles</option>
<option value="qbb">qbb - subtitles</option>
<option value="nor">nor - subtitles</option>
</select>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="lastMediaSettingsCachingInfoEnabled" onchange="setLastMediaSettingsCachingInfoEnabled()">
<label class="form-check-label" for="lastMediaSettingsCachingInfoEnabled">
streaming.lastMediaSettingsCachingInfo.enabled
</label>
</div>
<div class="mt-4">
<label>localStorage content: </label>
<div id="domStorage"></div>
</div>
<div class="mt-4">
<button type="button" class="btn btn-danger" onclick="clearDomStorage()">Clear localStorage</button>
<button type="button" id="loadButton" class="btn btn-success" onclick="play(this)">Load stream
</button>
<div class="settings">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="textDefaultEnabled" onchange="setTextDefaultEnabled()" checked>
<label class="form-check-label" for="textDefaultEnabled">
textDefaultEnabled
</label>
</div>
<div>
<label class="form-check-label" for="textSettings">
Initial settings language/role
</label>
<select class="form-select" onchange="setLang()" aria-label="Default select example" id="textSettings">
<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="qb">qbb - subtitles</option>
<option value="no">nor - subtitles</option>
</select>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="lastMediaSettingsCachingInfoEnabled" onchange="setLastMediaSettingsCachingInfoEnabled()">
<label class="form-check-label" for="lastMediaSettingsCachingInfoEnabled">
streaming.lastMediaSettingsCachingInfo.enabled
</label>
</div>
<div class="mt-4">
<label>localStorage content: </label>
<div id="domStorage"></div>
</div>
<div class="mt-4">
<button type="button" class="btn btn-danger" onclick="clearDomStorage()">Clear localStorage</button>
<button type="button" id="loadButton" class="btn btn-success" onclick="play(this)">Load stream
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion samples/dash-if-reference-player/index.html
Expand Up @@ -258,7 +258,7 @@
title="Choose bitrate based on buffer level.">
<input type="radio" id="abrBola" autocomplete="off" name="abrStrategy"
ng-model="ABRStrategy"
ng-click="changeABRStrategy('abrBola')" value="abrDynamic">
ng-click="changeABRStrategy('abrBola')" value="abrBola">
ABR Strategy: BOLA
</label>
<label data-toggle="tooltip" data-placement="right"
Expand Down

0 comments on commit a621b4a

Please sign in to comment.