@antmedia/web_player 2.11.2 → 2.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish-release.yml +20 -3
- package/dist/es/{plugin-50e1316e.js → plugin-06260ef3.js} +1 -1
- package/dist/es/{video.es-be70c095.js → video.es-0951ae41.js} +41 -36
- package/dist/es/{videojs-webrtc-plugin.es-777bf41a.js → videojs-webrtc-plugin.es-a1f9d342.js} +1 -11
- package/dist/es/web_player.js +3 -3
- package/dist/{plugin-bec9dc4a.js → plugin-1270024e.js} +9 -9
- package/dist/{video.es-df9af03d.js → video.es-474303e7.js} +43 -36
- package/dist/{videojs-webrtc-plugin.es-ee6d0333.js → videojs-webrtc-plugin.es-e643c42a.js} +22 -32
- package/dist/web_player.js +3 -3
- package/package.json +1 -1
- package/dist/es/videojs-webrtc-plugin-7054aa21.js +0 -3
- package/dist/es/videojs-webrtc-plugin.es-2a0dfc29.js +0 -40977
- package/dist/es/videojs-webrtc-plugin.es-333788d9.js +0 -7673
- package/dist/es/videojs-webrtc-plugin.es-9544f6e0.js +0 -7699
- package/dist/videojs-webrtc-plugin-3becde8c.js +0 -5
- package/dist/videojs-webrtc-plugin.es-0787d11e.js +0 -7701
- package/dist/videojs-webrtc-plugin.es-493b195e.js +0 -40979
- package/dist/videojs-webrtc-plugin.es-8f4ea4e4.js +0 -7675
- package/visual.code-workspace +0 -11
|
@@ -10,23 +10,40 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
12
|
- uses: actions/checkout@v3
|
|
13
|
+
|
|
13
14
|
- uses: actions/setup-node@v3
|
|
14
15
|
with:
|
|
15
16
|
node-version: '16.x'
|
|
16
|
-
# Setup .npmrc file to publish to npm
|
|
17
17
|
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
|
|
18
19
|
- uses: actions/setup-java@v3
|
|
19
20
|
with:
|
|
20
21
|
java-version: '11'
|
|
21
22
|
distribution: 'adopt'
|
|
23
|
+
|
|
22
24
|
- name: Get the version
|
|
23
25
|
id: get_version
|
|
24
26
|
run: echo "VERSION=$(echo ${GITHUB_REF##*/} | cut -d v -f 2)" >> $GITHUB_OUTPUT
|
|
27
|
+
|
|
25
28
|
- run: npm install
|
|
29
|
+
|
|
26
30
|
- run: npm run compile
|
|
31
|
+
|
|
27
32
|
- run: npm test
|
|
28
|
-
|
|
33
|
+
|
|
29
34
|
- run: npm publish
|
|
30
35
|
env:
|
|
31
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}
|
|
36
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- name: Update Embedded Player
|
|
39
|
+
if: success()
|
|
40
|
+
run: |
|
|
41
|
+
curl -L \
|
|
42
|
+
-X POST \
|
|
43
|
+
-H "Accept: application/vnd.github.v3+json" \
|
|
44
|
+
-H "Authorization: Bearer ${{ secrets.REPO_COMMUNICATION }}" \
|
|
45
|
+
https://api.github.com/repos/ant-media/StreamApp/actions/workflows/update-embedded-player.yml/dispatches \
|
|
46
|
+
-d '{"ref":"master"}'
|
|
47
|
+
|
|
48
|
+
|
|
32
49
|
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers-7d1333e8.js';
|
|
2
2
|
|
|
3
|
+
function _extends$3() {
|
|
4
|
+
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends$3.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
|
|
3
18
|
var win;
|
|
4
19
|
if (typeof window !== "undefined") {
|
|
5
20
|
win = window;
|
|
@@ -534,7 +549,7 @@ var safeParseTuple = /*@__PURE__*/getDefaultExportFromCjs(tuple);
|
|
|
534
549
|
|
|
535
550
|
var lib = {exports: {}};
|
|
536
551
|
|
|
537
|
-
var _extends$
|
|
552
|
+
var _extends$2 = {exports: {}};
|
|
538
553
|
|
|
539
554
|
(function (module) {
|
|
540
555
|
function _extends() {
|
|
@@ -552,9 +567,9 @@ var _extends$3 = {exports: {}};
|
|
|
552
567
|
return _extends.apply(this, arguments);
|
|
553
568
|
}
|
|
554
569
|
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
555
|
-
} (_extends$
|
|
570
|
+
} (_extends$2));
|
|
556
571
|
|
|
557
|
-
var _extendsExports = _extends$
|
|
572
|
+
var _extendsExports = _extends$2.exports;
|
|
558
573
|
|
|
559
574
|
var isFunction_1 = isFunction$1;
|
|
560
575
|
var toString$1 = Object.prototype.toString;
|
|
@@ -829,7 +844,7 @@ function getCharset(contentTypeHeader) {
|
|
|
829
844
|
var httpHandler = httpResponseHandler;
|
|
830
845
|
|
|
831
846
|
var window$2 = window_1;
|
|
832
|
-
var _extends$
|
|
847
|
+
var _extends$1 = _extendsExports;
|
|
833
848
|
var isFunction = isFunction_1;
|
|
834
849
|
var InterceptorsStorage = interceptors;
|
|
835
850
|
var RetryManager = retry;
|
|
@@ -897,7 +912,7 @@ function initParams(uri, options, callback) {
|
|
|
897
912
|
};
|
|
898
913
|
}
|
|
899
914
|
} else {
|
|
900
|
-
params = _extends$
|
|
915
|
+
params = _extends$1({}, options, {
|
|
901
916
|
uri: uri
|
|
902
917
|
});
|
|
903
918
|
}
|
|
@@ -2830,21 +2845,6 @@ if (!window$1.VTTCue) {
|
|
|
2830
2845
|
var browserIndexExports = browserIndex.exports;
|
|
2831
2846
|
var vtt = /*@__PURE__*/getDefaultExportFromCjs(browserIndexExports);
|
|
2832
2847
|
|
|
2833
|
-
function _extends$1() {
|
|
2834
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
2835
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2836
|
-
var source = arguments[i];
|
|
2837
|
-
for (var key in source) {
|
|
2838
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2839
|
-
target[key] = source[key];
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
}
|
|
2843
|
-
return target;
|
|
2844
|
-
};
|
|
2845
|
-
return _extends$1.apply(this, arguments);
|
|
2846
|
-
}
|
|
2847
|
-
|
|
2848
2848
|
var urlToolkit = {exports: {}};
|
|
2849
2849
|
|
|
2850
2850
|
(function (module, exports) {
|
|
@@ -3433,7 +3433,7 @@ class ParseStream extends Stream {
|
|
|
3433
3433
|
}
|
|
3434
3434
|
match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);
|
|
3435
3435
|
if (match) {
|
|
3436
|
-
event = _extends$
|
|
3436
|
+
event = _extends$3(parseByterange(match[1]), {
|
|
3437
3437
|
type: 'tag',
|
|
3438
3438
|
tagType: 'byterange'
|
|
3439
3439
|
});
|
|
@@ -4265,7 +4265,7 @@ class Parser extends Stream {
|
|
|
4265
4265
|
if (!currentUri.attributes) {
|
|
4266
4266
|
currentUri.attributes = {};
|
|
4267
4267
|
}
|
|
4268
|
-
_extends$
|
|
4268
|
+
_extends$3(currentUri.attributes, entry.attributes);
|
|
4269
4269
|
},
|
|
4270
4270
|
media() {
|
|
4271
4271
|
this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;
|
|
@@ -4516,8 +4516,8 @@ class Parser extends Stream {
|
|
|
4516
4516
|
} // if tags with the same ID do not have conflicting attributes, merge them
|
|
4517
4517
|
|
|
4518
4518
|
const dateRangeWithSameId = this.manifest.dateRanges.findIndex(dateRangeToFind => dateRangeToFind.id === dateRange.id);
|
|
4519
|
-
this.manifest.dateRanges[dateRangeWithSameId] = _extends$
|
|
4520
|
-
dateRangeTags[dateRange.id] = _extends$
|
|
4519
|
+
this.manifest.dateRanges[dateRangeWithSameId] = _extends$3(this.manifest.dateRanges[dateRangeWithSameId], dateRange);
|
|
4520
|
+
dateRangeTags[dateRange.id] = _extends$3(dateRangeTags[dateRange.id], dateRange); // after merging, delete the duplicate dateRange that was added last
|
|
4521
4521
|
|
|
4522
4522
|
this.manifest.dateRanges.pop();
|
|
4523
4523
|
}
|
|
@@ -26357,7 +26357,7 @@ const phonyUri=`placeholder-uri-${i}`;main.playlists[i].uri=phonyUri;}}const aud
|
|
|
26357
26357
|
if(!properties.playlists||!properties.playlists.length){// If the manifest is audio only and this media group does not have a uri, check
|
|
26358
26358
|
// if the media group is located in the main list of playlists. If it is, don't add
|
|
26359
26359
|
// placeholder properties as it shouldn't be considered an alternate audio track.
|
|
26360
|
-
if(audioOnlyMain&&mediaType==='AUDIO'&&!properties.uri){for(let i=0;i<main.playlists.length;i++){const p=main.playlists[i];if(p.attributes&&p.attributes.AUDIO&&p.attributes.AUDIO===groupKey){return;}}}properties.playlists=[_extends$
|
|
26360
|
+
if(audioOnlyMain&&mediaType==='AUDIO'&&!properties.uri){for(let i=0;i<main.playlists.length;i++){const p=main.playlists[i];if(p.attributes&&p.attributes.AUDIO&&p.attributes.AUDIO===groupKey){return;}}}properties.playlists=[_extends$3({},properties)];}properties.playlists.forEach(function(p,i){const groupId=createGroupID(mediaType,groupKey,labelKey,p);const id=createPlaylistID(i,groupId);if(p.uri){p.resolvedUri=p.resolvedUri||resolveUrl(main.uri,p.uri);}else {// DEPRECATED, this has been added to prevent a breaking change.
|
|
26361
26361
|
// previously we only ever had a single media group playlist, so
|
|
26362
26362
|
// we mark the first playlist uri without prepending the index as we used to
|
|
26363
26363
|
// ideally we would do all of the playlists the same way.
|
|
@@ -26371,7 +26371,7 @@ if(this.offset_!==null){return;}// no segment to process
|
|
|
26371
26371
|
if(!segments.length){return;}const[firstSegment]=segments;// no program date time
|
|
26372
26372
|
if(firstSegment.programDateTime===undefined){return;}// Set offset as ProgramDateTime for the very first segment of the very first playlist load:
|
|
26373
26373
|
this.offset_=firstSegment.programDateTime/1000;}setPendingDateRanges(dateRanges=[]){if(!dateRanges.length){return;}const[dateRange]=dateRanges;const startTime=dateRange.startDate.getTime();this.trimProcessedDateRanges_(startTime);this.pendingDateRanges_=dateRanges.reduce((map,pendingDateRange)=>{map.set(pendingDateRange.id,pendingDateRange);return map;},new Map());}processDateRange(dateRange){this.pendingDateRanges_.delete(dateRange.id);this.processedDateRanges_.set(dateRange.id,dateRange);}getDateRangesToProcess(){if(this.offset_===null){return [];}const dateRangeClasses={};const dateRangesToProcess=[];this.pendingDateRanges_.forEach((dateRange,id)=>{if(this.processedDateRanges_.has(id)){return;}dateRange.startTime=dateRange.startDate.getTime()/1000-this.offset_;dateRange.processDateRange=()=>this.processDateRange(dateRange);dateRangesToProcess.push(dateRange);if(!dateRange.class){return;}if(dateRangeClasses[dateRange.class]){const length=dateRangeClasses[dateRange.class].push(dateRange);dateRange.classListIndex=length-1;}else {dateRangeClasses[dateRange.class]=[dateRange];dateRange.classListIndex=0;}});for(const dateRange of dateRangesToProcess){const classList=dateRangeClasses[dateRange.class]||[];if(dateRange.endDate){dateRange.endTime=dateRange.endDate.getTime()/1000-this.offset_;}else if(dateRange.endOnNext&&classList[dateRange.classListIndex+1]){dateRange.endTime=classList[dateRange.classListIndex+1].startTime;}else if(dateRange.duration){dateRange.endTime=dateRange.startTime+dateRange.duration;}else if(dateRange.plannedDuration){dateRange.endTime=dateRange.startTime+dateRange.plannedDuration;}else {dateRange.endTime=dateRange.startTime;}}return dateRangesToProcess;}trimProcessedDateRanges_(startTime){const copy=new Map(this.processedDateRanges_);copy.forEach((dateRange,id)=>{if(dateRange.startDate.getTime()<startTime){this.processedDateRanges_.delete(id);}});}}const QUOTA_EXCEEDED_ERR=22;const getStreamingNetworkErrorMetadata=({requestType,request,error,parseFailure})=>{const isBadStatus=request.status<200||request.status>299;const isFailure=request.status>=400&&request.status<=499;const errorMetadata={uri:request.uri,requestType};const isBadStatusOrParseFailure=isBadStatus&&!isFailure||parseFailure;if(error&&isFailure){// copy original error and add to the metadata.
|
|
26374
|
-
errorMetadata.error=_extends$
|
|
26374
|
+
errorMetadata.error=_extends$3({},error);errorMetadata.errorType=videojs.Error.NetworkRequestFailed;}else if(request.aborted){errorMetadata.errorType=videojs.Error.NetworkRequestAborted;}else if(request.timedout){errorMetadata.erroType=videojs.Error.NetworkRequestTimeout;}else if(isBadStatusOrParseFailure){const errorType=parseFailure?videojs.Error.NetworkBodyParserFailed:videojs.Error.NetworkBadStatus;errorMetadata.errorType=errorType;errorMetadata.status=request.status;errorMetadata.headers=request.headers;}return errorMetadata;};const{EventTarget:EventTarget$1}=videojs;const addLLHLSQueryDirectives=(uri,media)=>{if(media.endList||!media.serverControl){return uri;}const parameters={};if(media.serverControl.canBlockReload){const{preloadSegment}=media;// next msn is a zero based value, length is not.
|
|
26375
26375
|
let nextMSN=media.mediaSequence+media.segments.length;// If preload segment has parts then it is likely
|
|
26376
26376
|
// that we are going to request a part of that preload segment.
|
|
26377
26377
|
// the logic below is used to determine that.
|
|
@@ -26640,7 +26640,7 @@ main.playlists[playlistId]=playlist;main.playlists[uri]=playlist;this.createClon
|
|
|
26640
26640
|
// to the next media type.
|
|
26641
26641
|
if(!main.mediaGroups[mediaType]||main.mediaGroups[mediaType][id]){return;}for(const groupKey in main.mediaGroups[mediaType]){if(groupKey===baseID){// Create the group.
|
|
26642
26642
|
main.mediaGroups[mediaType][id]={};}else {// There is no need to iterate over label keys in this case.
|
|
26643
|
-
continue;}for(const labelKey in main.mediaGroups[mediaType][groupKey]){const oldMedia=main.mediaGroups[mediaType][groupKey][labelKey];main.mediaGroups[mediaType][id][labelKey]=_extends$
|
|
26643
|
+
continue;}for(const labelKey in main.mediaGroups[mediaType][groupKey]){const oldMedia=main.mediaGroups[mediaType][groupKey][labelKey];main.mediaGroups[mediaType][id][labelKey]=_extends$3({},oldMedia);const newMedia=main.mediaGroups[mediaType][id][labelKey];// update URIs on the media
|
|
26644
26644
|
const newUri=this.createCloneURI_(oldMedia.resolvedUri,clone);newMedia.resolvedUri=newUri;newMedia.uri=newUri;// Reset playlists in the new media group.
|
|
26645
26645
|
newMedia.playlists=[];// Create new playlists in the newly cloned media group.
|
|
26646
26646
|
oldMedia.playlists.forEach((p,i)=>{const oldMediaPlaylist=main.playlists[p.id];const group=groupID(mediaType,id,labelKey);const newPlaylistID=createPlaylistID(id,group);// Check to see if it already exists
|
|
@@ -29453,7 +29453,7 @@ data:buffer,// To recreate the original typed-array, we need information
|
|
|
29453
29453
|
// about what portion of the ArrayBuffer it was a view into
|
|
29454
29454
|
byteOffset,byteLength:bytes.byteLength},[buffer]);}if(isEndOfTimeline){transmuxer.postMessage({action:'endTimeline'});}// even if we didn't push any bytes, we have to make sure we flush in case we reached
|
|
29455
29455
|
// the end of the segment
|
|
29456
|
-
transmuxer.postMessage({action:'flush'});};const dequeue=transmuxer=>{transmuxer.currentTransmux=null;if(transmuxer.transmuxQueue.length){transmuxer.currentTransmux=transmuxer.transmuxQueue.shift();if(typeof transmuxer.currentTransmux==='function'){transmuxer.currentTransmux();}else {processTransmux(transmuxer.currentTransmux);}}};const processAction=(transmuxer,action)=>{transmuxer.postMessage({action});dequeue(transmuxer);};const enqueueAction=(action,transmuxer)=>{if(!transmuxer.currentTransmux){transmuxer.currentTransmux=action;processAction(transmuxer,action);return;}transmuxer.transmuxQueue.push(processAction.bind(null,transmuxer,action));};const reset=transmuxer=>{enqueueAction('reset',transmuxer);};const endTimeline=transmuxer=>{enqueueAction('endTimeline',transmuxer);};const transmux=options=>{if(!options.transmuxer.currentTransmux){options.transmuxer.currentTransmux=options;processTransmux(options);return;}options.transmuxer.transmuxQueue.push(options);};const createTransmuxer=options=>{const transmuxer=new TransmuxWorker();transmuxer.currentTransmux=null;transmuxer.transmuxQueue=[];const term=transmuxer.terminate;transmuxer.terminate=()=>{transmuxer.currentTransmux=null;transmuxer.transmuxQueue.length=0;return term.call(transmuxer);};transmuxer.postMessage({action:'init',options});return transmuxer;};var segmentTransmuxer={reset,endTimeline,transmux,createTransmuxer};const workerCallback=function(options){const transmuxer=options.transmuxer;const endAction=options.endAction||options.action;const callback=options.callback;const message=_extends$
|
|
29456
|
+
transmuxer.postMessage({action:'flush'});};const dequeue=transmuxer=>{transmuxer.currentTransmux=null;if(transmuxer.transmuxQueue.length){transmuxer.currentTransmux=transmuxer.transmuxQueue.shift();if(typeof transmuxer.currentTransmux==='function'){transmuxer.currentTransmux();}else {processTransmux(transmuxer.currentTransmux);}}};const processAction=(transmuxer,action)=>{transmuxer.postMessage({action});dequeue(transmuxer);};const enqueueAction=(action,transmuxer)=>{if(!transmuxer.currentTransmux){transmuxer.currentTransmux=action;processAction(transmuxer,action);return;}transmuxer.transmuxQueue.push(processAction.bind(null,transmuxer,action));};const reset=transmuxer=>{enqueueAction('reset',transmuxer);};const endTimeline=transmuxer=>{enqueueAction('endTimeline',transmuxer);};const transmux=options=>{if(!options.transmuxer.currentTransmux){options.transmuxer.currentTransmux=options;processTransmux(options);return;}options.transmuxer.transmuxQueue.push(options);};const createTransmuxer=options=>{const transmuxer=new TransmuxWorker();transmuxer.currentTransmux=null;transmuxer.transmuxQueue=[];const term=transmuxer.terminate;transmuxer.terminate=()=>{transmuxer.currentTransmux=null;transmuxer.transmuxQueue.length=0;return term.call(transmuxer);};transmuxer.postMessage({action:'init',options});return transmuxer;};var segmentTransmuxer={reset,endTimeline,transmux,createTransmuxer};const workerCallback=function(options){const transmuxer=options.transmuxer;const endAction=options.endAction||options.action;const callback=options.callback;const message=_extends$3({},options,{endAction:null,transmuxer:null,callback:null});const listenForEndEvent=event=>{if(event.data.action!==endAction){return;}transmuxer.removeEventListener('message',listenForEndEvent);// transfer ownership of bytes back to us.
|
|
29457
29457
|
if(event.data.data){event.data.data=new Uint8Array(event.data.data,options.byteOffset||0,options.byteLength||event.data.data.byteLength);if(options.data){options.data=event.data.data;}}callback(event.data);};transmuxer.addEventListener('message',listenForEndEvent);if(options.data){const isArrayBuffer=options.data instanceof ArrayBuffer;message.byteOffset=isArrayBuffer?0:options.data.byteOffset;message.byteLength=options.data.byteLength;const transfers=[isArrayBuffer?options.data:options.data.buffer];transmuxer.postMessage(message,transfers);}else {transmuxer.postMessage(message);}};const REQUEST_ERRORS={FAILURE:2,TIMEOUT:-101,ABORTED:-102};/**
|
|
29458
29458
|
* Abort all requests
|
|
29459
29459
|
*
|
|
@@ -30337,14 +30337,14 @@ this.cacheEncryptionKeys_=settings.cacheEncryptionKeys;this.keyCache_={};this.de
|
|
|
30337
30337
|
// between a time in the display time and a segment index within
|
|
30338
30338
|
// a playlist
|
|
30339
30339
|
this.syncController_=settings.syncController;this.syncPoint_={segmentIndex:0,time:0};this.transmuxer_=this.createTransmuxer_();this.triggerSyncInfoUpdate_=()=>this.trigger('syncinfoupdate');this.syncController_.on('syncinfoupdate',this.triggerSyncInfoUpdate_);this.mediaSource_.addEventListener('sourceopen',()=>{if(!this.isEndOfStream_()){this.ended_=false;}});// ...for determining the fetch location
|
|
30340
|
-
this.fetchAtBuffer_=false;this.logger_=logger(`SegmentLoader[${this.loaderType_}]`);Object.defineProperty(this,'state',{get(){return this.state_;},set(newState){if(newState!==this.state_){this.logger_(`${this.state_} -> ${newState}`);this.state_=newState;this.trigger('statechange');}}});this.sourceUpdater_.on('ready',()=>{if(this.hasEnoughInfoToAppend_()){this.processCallQueue_();}});this.sourceUpdater_.on('codecschange',metadata=>{this.trigger(_extends$
|
|
30340
|
+
this.fetchAtBuffer_=false;this.logger_=logger(`SegmentLoader[${this.loaderType_}]`);Object.defineProperty(this,'state',{get(){return this.state_;},set(newState){if(newState!==this.state_){this.logger_(`${this.state_} -> ${newState}`);this.state_=newState;this.trigger('statechange');}}});this.sourceUpdater_.on('ready',()=>{if(this.hasEnoughInfoToAppend_()){this.processCallQueue_();}});this.sourceUpdater_.on('codecschange',metadata=>{this.trigger(_extends$3({type:'codecschange'},metadata));});// Only the main loader needs to listen for pending timeline changes, as the main
|
|
30341
30341
|
// loader should wait for audio to be ready to change its timeline so that both main
|
|
30342
30342
|
// and audio timelines change together. For more details, see the
|
|
30343
30343
|
// shouldWaitForTimelineChange function.
|
|
30344
30344
|
if(this.loaderType_==='main'){this.timelineChangeController_.on('pendingtimelinechange',()=>{if(this.hasEnoughInfoToAppend_()){this.processCallQueue_();}});}// The main loader only listens on pending timeline changes, but the audio loader,
|
|
30345
30345
|
// since its loads follow main, needs to listen on timeline changes. For more details,
|
|
30346
30346
|
// see the shouldWaitForTimelineChange function.
|
|
30347
|
-
if(this.loaderType_==='audio'){this.timelineChangeController_.on('timelinechange',metadata=>{this.trigger(_extends$
|
|
30347
|
+
if(this.loaderType_==='audio'){this.timelineChangeController_.on('timelinechange',metadata=>{this.trigger(_extends$3({type:'timelinechange'},metadata));if(this.hasEnoughInfoToLoad_()){this.processLoadQueue_();}if(this.hasEnoughInfoToAppend_()){this.processCallQueue_();}});}}/**
|
|
30348
30348
|
* TODO: Current sync controller consists of many hls-specific strategies
|
|
30349
30349
|
* media sequence sync is also hls-specific, and we would like to be protocol-agnostic on this level
|
|
30350
30350
|
* this should be a part of the sync-controller and sync controller should expect different strategy list based on the protocol.
|
|
@@ -30835,7 +30835,7 @@ segment[timingInfoProperty].baseMediaDecodeTime=segmentTimingInfo.baseMediaDecod
|
|
|
30835
30835
|
* @private
|
|
30836
30836
|
*/loadSegment_(segmentInfo){this.state='WAITING';this.pendingSegment_=segmentInfo;this.trimBackBuffer_(segmentInfo);if(typeof segmentInfo.timestampOffset==='number'){if(this.transmuxer_){this.transmuxer_.postMessage({action:'clearAllMp4Captions'});}}if(!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(()=>{// regenerate the audioAppendStart, timestampOffset, etc as they
|
|
30837
30837
|
// may have changed since this function was added to the queue.
|
|
30838
|
-
const options=_extends$
|
|
30838
|
+
const options=_extends$3({},segmentInfo,{forceTimestampOffset:true});_extends$3(segmentInfo,this.generateSegmentInfo_(options));this.isPendingTimestampOffset_=false;this.updateTransmuxerAndRequestSegment_(segmentInfo);});return;}this.updateTransmuxerAndRequestSegment_(segmentInfo);}updateTransmuxerAndRequestSegment_(segmentInfo){// We'll update the source buffer's timestamp offset once we have transmuxed data, but
|
|
30839
30839
|
// the transmuxer still needs to be updated before then.
|
|
30840
30840
|
//
|
|
30841
30841
|
// Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp
|
|
@@ -32377,7 +32377,7 @@ if(updatedPlaylist.lastExcludeReason_==='playlist-unchanged'){return;}const play
|
|
|
32377
32377
|
// safe live point).
|
|
32378
32378
|
this.excludePlaylist({error:{message:'Playlist no longer updating.',reason:'playlist-unchanged'}});// useful for monitoring QoS
|
|
32379
32379
|
this.tech_.trigger('playliststuck');}});this.mainPlaylistLoader_.on('renditiondisabled',()=>{this.tech_.trigger({type:'usage',name:'vhs-rendition-disabled'});});this.mainPlaylistLoader_.on('renditionenabled',()=>{this.tech_.trigger({type:'usage',name:'vhs-rendition-enabled'});});const playlistLoaderEvents=['manifestrequeststart','manifestrequestcomplete','manifestparsestart','manifestparsecomplete','playlistrequeststart','playlistrequestcomplete','playlistparsestart','playlistparsecomplete','renditiondisabled','renditionenabled'];playlistLoaderEvents.forEach(eventName=>{this.mainPlaylistLoader_.on(eventName,metadata=>{// trigger directly on the player to ensure early events are fired.
|
|
32380
|
-
this.player_.trigger(_extends$
|
|
32380
|
+
this.player_.trigger(_extends$3({},metadata));});});}/**
|
|
32381
32381
|
* Given an updated media playlist (whether it was loaded for the first time, or
|
|
32382
32382
|
* refreshed for live playlists), update any relevant properties and state to reflect
|
|
32383
32383
|
* changes in the media that should be accounted for (e.g., cues and duration).
|
|
@@ -32411,7 +32411,7 @@ this.mainSegmentLoader_.load();}});// `progress` events are not reliable enough
|
|
|
32411
32411
|
// based ABR.
|
|
32412
32412
|
if(!this.bufferBasedABR){this.mainSegmentLoader_.on('progress',()=>{this.trigger('progress');});}this.mainSegmentLoader_.on('error',()=>{const error=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:error.playlist,error});});this.mainSegmentLoader_.on('appenderror',()=>{this.error=this.mainSegmentLoader_.error_;this.trigger('error');});this.mainSegmentLoader_.on('syncinfoupdate',()=>{this.onSyncInfoUpdate_();});this.mainSegmentLoader_.on('timestampoffset',()=>{this.tech_.trigger({type:'usage',name:'vhs-timestamp-offset'});});this.audioSegmentLoader_.on('syncinfoupdate',()=>{this.onSyncInfoUpdate_();});this.audioSegmentLoader_.on('appenderror',()=>{this.error=this.audioSegmentLoader_.error_;this.trigger('error');});this.mainSegmentLoader_.on('ended',()=>{this.logger_('main segment loader ended');this.onEndOfStream();});this.mainSegmentLoader_.on('earlyabort',event=>{// never try to early abort with the new ABR algorithm
|
|
32413
32413
|
if(this.bufferBasedABR){return;}this.delegateLoaders_('all',['abort']);this.excludePlaylist({error:{message:'Aborted early because there isn\'t enough bandwidth to complete '+'the request without rebuffering.'},playlistExclusionDuration:ABORT_EARLY_EXCLUSION_SECONDS});});const updateCodecs=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers()){return this.tryToCreateSourceBuffers_();}const codecs=this.getCodecsOrExclude_();// no codecs means that the playlist was excluded
|
|
32414
|
-
if(!codecs){return;}this.sourceUpdater_.addOrChangeSourceBuffers(codecs);};this.mainSegmentLoader_.on('trackinfo',updateCodecs);this.audioSegmentLoader_.on('trackinfo',updateCodecs);this.mainSegmentLoader_.on('fmp4',()=>{if(!this.triggeredFmp4Usage){this.tech_.trigger({type:'usage',name:'vhs-fmp4'});this.triggeredFmp4Usage=true;}});this.audioSegmentLoader_.on('fmp4',()=>{if(!this.triggeredFmp4Usage){this.tech_.trigger({type:'usage',name:'vhs-fmp4'});this.triggeredFmp4Usage=true;}});this.audioSegmentLoader_.on('ended',()=>{this.logger_('audioSegmentLoader ended');this.onEndOfStream();});const segmentLoaderEvents=['segmentselected','segmentloadstart','segmentloaded','segmentkeyloadstart','segmentkeyloadcomplete','segmentdecryptionstart','segmentdecryptioncomplete','segmenttransmuxingstart','segmenttransmuxingcomplete','segmenttransmuxingtrackinfoavailable','segmenttransmuxingtiminginfoavailable','segmentappendstart','appendsdone','bandwidthupdated','timelinechange','codecschange'];segmentLoaderEvents.forEach(eventName=>{this.mainSegmentLoader_.on(eventName,metadata=>{this.player_.trigger(_extends$
|
|
32414
|
+
if(!codecs){return;}this.sourceUpdater_.addOrChangeSourceBuffers(codecs);};this.mainSegmentLoader_.on('trackinfo',updateCodecs);this.audioSegmentLoader_.on('trackinfo',updateCodecs);this.mainSegmentLoader_.on('fmp4',()=>{if(!this.triggeredFmp4Usage){this.tech_.trigger({type:'usage',name:'vhs-fmp4'});this.triggeredFmp4Usage=true;}});this.audioSegmentLoader_.on('fmp4',()=>{if(!this.triggeredFmp4Usage){this.tech_.trigger({type:'usage',name:'vhs-fmp4'});this.triggeredFmp4Usage=true;}});this.audioSegmentLoader_.on('ended',()=>{this.logger_('audioSegmentLoader ended');this.onEndOfStream();});const segmentLoaderEvents=['segmentselected','segmentloadstart','segmentloaded','segmentkeyloadstart','segmentkeyloadcomplete','segmentdecryptionstart','segmentdecryptioncomplete','segmenttransmuxingstart','segmenttransmuxingcomplete','segmenttransmuxingtrackinfoavailable','segmenttransmuxingtiminginfoavailable','segmentappendstart','appendsdone','bandwidthupdated','timelinechange','codecschange'];segmentLoaderEvents.forEach(eventName=>{this.mainSegmentLoader_.on(eventName,metadata=>{this.player_.trigger(_extends$3({},metadata));});this.audioSegmentLoader_.on(eventName,metadata=>{this.player_.trigger(_extends$3({},metadata));});this.subtitleSegmentLoader_.on(eventName,metadata=>{this.player_.trigger(_extends$3({},metadata));});});}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded);}/**
|
|
32415
32415
|
* Call load on our SegmentLoaders
|
|
32416
32416
|
*/load(){this.mainSegmentLoader_.load();if(this.mediaTypes_.AUDIO.activePlaylistLoader){this.audioSegmentLoader_.load();}if(this.mediaTypes_.SUBTITLES.activePlaylistLoader){this.subtitleSegmentLoader_.load();}}/**
|
|
32417
32417
|
* Re-tune playback quality level for the current player
|
|
@@ -32707,7 +32707,7 @@ this.tech_.one('canplay',()=>{this.contentSteeringController_.requestSteeringMan
|
|
|
32707
32707
|
* Reset the content steering controller and re-init.
|
|
32708
32708
|
*/resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways();this.contentSteeringController_.dispose();this.initContentSteeringController_();}/**
|
|
32709
32709
|
* Attaches the listeners for content steering.
|
|
32710
|
-
*/attachContentSteeringListeners_(){this.contentSteeringController_.on('content-steering',this.excludeThenChangePathway_.bind(this));const contentSteeringEvents=['contentsteeringloadstart','contentsteeringloadcomplete','contentsteeringparsed'];contentSteeringEvents.forEach(eventName=>{this.contentSteeringController_.on(eventName,metadata=>{this.trigger(_extends$
|
|
32710
|
+
*/attachContentSteeringListeners_(){this.contentSteeringController_.on('content-steering',this.excludeThenChangePathway_.bind(this));const contentSteeringEvents=['contentsteeringloadstart','contentsteeringloadcomplete','contentsteeringparsed'];contentSteeringEvents.forEach(eventName=>{this.contentSteeringController_.on(eventName,metadata=>{this.trigger(_extends$3({},metadata));});});if(this.sourceType_==='dash'){this.mainPlaylistLoader_.on('loadedplaylist',()=>{const main=this.main();// check if steering tag or pathways changed.
|
|
32711
32711
|
const didDashTagChange=this.contentSteeringController_.didDASHTagChange(main.uri,main.contentSteering);const didPathwaysChange=()=>{const availablePathways=this.contentSteeringController_.getAvailablePathways();const newPathways=[];for(const playlist of main.playlists){const serviceLocation=playlist.attributes.serviceLocation;if(serviceLocation){newPathways.push(serviceLocation);if(!availablePathways.has(serviceLocation)){return true;}}}// If we have no new serviceLocations and previously had availablePathways
|
|
32712
32712
|
if(!newPathways.length&&availablePathways.size){return true;}return false;};if(didDashTagChange||didPathwaysChange()){this.resetContentSteeringController_();}});}}/**
|
|
32713
32713
|
* Simple exclude and change playlist logic for content steering.
|
|
@@ -33311,7 +33311,7 @@ seekToProgramTime(programTime,callback,pauseAfterSeek=true,retryCount=2){return
|
|
|
33311
33311
|
*/this.xhr.offResponse=callback=>{removeOnResponseHook(this.xhr,callback);};// Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.
|
|
33312
33312
|
// This allows hooks to be set before the source is set to vhs when handleSource is called.
|
|
33313
33313
|
this.player_.trigger('xhr-hooks-ready');}attachStreamingEventListeners_(){const playlistControllerEvents=['seekablerangeschanged','bufferedrangeschanged','contentsteeringloadstart','contentsteeringloadcomplete','contentsteeringparsed'];const playbackWatcher=['gapjumped','playedrangeschanged'];// re-emit streaming events and payloads on the player.
|
|
33314
|
-
playlistControllerEvents.forEach(eventName=>{this.playlistController_.on(eventName,metadata=>{this.player_.trigger(_extends$
|
|
33314
|
+
playlistControllerEvents.forEach(eventName=>{this.playlistController_.on(eventName,metadata=>{this.player_.trigger(_extends$3({},metadata));});});playbackWatcher.forEach(eventName=>{this.playbackWatcher_.on(eventName,metadata=>{this.player_.trigger(_extends$3({},metadata));});});}}/**
|
|
33315
33315
|
* The Source Handler object, which informs video.js what additional
|
|
33316
33316
|
* MIME types are supported and sets up playback. It is registered
|
|
33317
33317
|
* automatically to the appropriate tech based on the capabilities of
|
|
@@ -33325,4 +33325,9 @@ playlistControllerEvents.forEach(eventName=>{this.playlistController_.on(eventNa
|
|
|
33325
33325
|
*/const supportsNativeMediaSources=()=>{return browserSupportsCodec('avc1.4d400d,mp4a.40.2');};// register source handlers with the appropriate techs
|
|
33326
33326
|
if(supportsNativeMediaSources()){videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler,0);}videojs.VhsHandler=VhsHandler;videojs.VhsSourceHandler=VhsSourceHandler;videojs.Vhs=Vhs;if(!videojs.use){videojs.registerComponent('Vhs',Vhs);}videojs.options.vhs=videojs.options.vhs||{};if(!videojs.getPlugin||!videojs.getPlugin('reloadSourceOnError')){videojs.registerPlugin('reloadSourceOnError',reloadSourceOnError);}
|
|
33327
33327
|
|
|
33328
|
-
|
|
33328
|
+
var video_es = /*#__PURE__*/Object.freeze({
|
|
33329
|
+
__proto__: null,
|
|
33330
|
+
default: videojs
|
|
33331
|
+
});
|
|
33332
|
+
|
|
33333
|
+
export { _extends$3 as _, video_es as a, videojs as v };
|
package/dist/es/{videojs-webrtc-plugin.es-777bf41a.js → videojs-webrtc-plugin.es-a1f9d342.js}
RENAMED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import videojs from './video.es-
|
|
1
|
+
import { v as videojs, _ as _extends } from './video.es-0951ae41.js';
|
|
2
2
|
import './_commonjsHelpers-7d1333e8.js';
|
|
3
3
|
|
|
4
|
-
function _extends() {
|
|
5
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
6
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
7
|
-
var t = arguments[e];
|
|
8
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
9
|
-
}
|
|
10
|
-
return n;
|
|
11
|
-
}, _extends.apply(null, arguments);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
4
|
/*! @name @antmedia/videojs-webrtc-plugin @version 1.3.1 @license MIT */
|
|
15
5
|
const ANT_CALLBACKS = {
|
|
16
6
|
INITIALIZED: 'initialized',
|
package/dist/es/web_player.js
CHANGED
|
@@ -709,7 +709,7 @@ class WebPlayer {
|
|
|
709
709
|
var styleElement = this.dom.createElement('style');
|
|
710
710
|
styleElement.textContent = css.default.toString(); // Assuming css module exports a string
|
|
711
711
|
this.dom.head.appendChild(styleElement);
|
|
712
|
-
return import('./videojs-webrtc-plugin.es-
|
|
712
|
+
return import('./videojs-webrtc-plugin.es-a1f9d342.js').then(videojsWebrtcPluginLocal => {
|
|
713
713
|
Logger_1.info("videojs-webrtc-plugin is loaded");
|
|
714
714
|
});
|
|
715
715
|
});
|
|
@@ -730,12 +730,12 @@ class WebPlayer {
|
|
|
730
730
|
styleElement.textContent = css.default.toString(); // Assuming css module exports a string
|
|
731
731
|
this.dom.head.appendChild(styleElement);
|
|
732
732
|
}).then(() => {
|
|
733
|
-
return import('./video.es-
|
|
733
|
+
return import('./video.es-0951ae41.js').then(function (n) { return n.a; });
|
|
734
734
|
}).then(videojs => {
|
|
735
735
|
window.videojs = videojs.default;
|
|
736
736
|
this.videojsLoaded = true;
|
|
737
737
|
}).then(() => {
|
|
738
|
-
return import('./plugin-
|
|
738
|
+
return import('./plugin-06260ef3.js');
|
|
739
739
|
}).then(() => {
|
|
740
740
|
return this.loadWebRTCComponents();
|
|
741
741
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var video_es = require('./video.es-
|
|
3
|
+
var video_es = require('./video.es-474303e7.js');
|
|
4
4
|
require('./_commonjsHelpers-ed042b00.js');
|
|
5
5
|
|
|
6
6
|
var version = "1.1.1";
|
|
7
7
|
|
|
8
|
-
var VideoJsButtonClass = video_es.
|
|
9
|
-
var VideoJsMenuClass = video_es.
|
|
10
|
-
var VideoJsComponent = video_es.
|
|
11
|
-
var Dom = video_es.
|
|
8
|
+
var VideoJsButtonClass = video_es.videojs.getComponent('MenuButton');
|
|
9
|
+
var VideoJsMenuClass = video_es.videojs.getComponent('Menu');
|
|
10
|
+
var VideoJsComponent = video_es.videojs.getComponent('Component');
|
|
11
|
+
var Dom = video_es.videojs.dom;
|
|
12
12
|
/**
|
|
13
13
|
* Convert string to title case.
|
|
14
14
|
*
|
|
@@ -68,7 +68,7 @@ function ConcreteButton(player) {
|
|
|
68
68
|
return ConcreteButtonInit;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
var VideoJsMenuItemClass = video_es.
|
|
71
|
+
var VideoJsMenuItemClass = video_es.videojs.getComponent('MenuItem');
|
|
72
72
|
/**
|
|
73
73
|
* Create a QualitySelectorHls plugin instance.
|
|
74
74
|
*
|
|
@@ -141,7 +141,7 @@ var QualitySelectorHlsClass = /*#__PURE__*/function () {
|
|
|
141
141
|
|
|
142
142
|
// the parent class will add player under this.player
|
|
143
143
|
this.player = player;
|
|
144
|
-
this.config = video_es.
|
|
144
|
+
this.config = video_es.videojs.obj.merge(defaults, options);
|
|
145
145
|
player.ready(function () {
|
|
146
146
|
_this.player.addClass('vjs-quality-selector-hls');
|
|
147
147
|
if (_this.player.qualityLevels) {
|
|
@@ -302,9 +302,9 @@ var initPlugin = function initPlugin(player, options) {
|
|
|
302
302
|
return QualitySelectorHls;
|
|
303
303
|
};
|
|
304
304
|
var QualitySelectorHls = function QualitySelectorHls(options) {
|
|
305
|
-
return initPlugin(this, video_es.
|
|
305
|
+
return initPlugin(this, video_es.videojs.obj.merge({}, options));
|
|
306
306
|
}; // Register the plugin with video.js.
|
|
307
307
|
|
|
308
|
-
video_es.
|
|
308
|
+
video_es.videojs.registerPlugin('qualitySelectorHls', QualitySelectorHls);
|
|
309
309
|
|
|
310
310
|
exports.default = QualitySelectorHls;
|