Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xgplayer-flv.js

Package Overview
Dependencies
Maintainers
5
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xgplayer-flv.js - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0-beta.0

2

package.json
{
"name": "xgplayer-flv.js",
"version": "2.0.2",
"version": "2.1.0-beta.0",
"description": "web video player",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -65,2 +65,3 @@ /*

ctl.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this));
ctl.on(TransmuxingEvents.LOADED_SEI, this._onLoadedSei.bind(this));
}

@@ -192,2 +193,8 @@ }

_onLoadedSei(timestamp,data) {
Promise.resolve().then(() => {
this._emitter.emit(TransmuxingEvents.LOADED_SEI, timestamp, data);
});
}
_onLoggingConfigChanged(config) {

@@ -194,0 +201,0 @@ if (this._worker) {

@@ -269,2 +269,4 @@ /*

this._demuxer.onLoadedSei = this._onLoadedSei.bind(this);
this._remuxer.bindDataSource(this._demuxer

@@ -318,2 +320,6 @@ .bindDataSource(this._ioctl

_onLoadedSei(timestamp, data) {
this._emitter.emit(TransmuxingEvents.LOADED_SEI,timestamp,data);
}
_onIOSeeked() {

@@ -320,0 +326,0 @@ this._remuxer.insertDiscontinuity();

@@ -28,5 +28,6 @@ /*

STATISTICS_INFO: 'statistics_info',
RECOMMEND_SEEKPOINT: 'recommend_seekpoint'
RECOMMEND_SEEKPOINT: 'recommend_seekpoint',
LOADED_SEI: 'loaded_sei'
};
export default TransmuxingEvents;

@@ -113,2 +113,4 @@ /*

})();
this._onLoadedSei = null;
}

@@ -231,2 +233,10 @@

set onLoadedSei(callback) {
this._onLoadedSei = callback;
}
get onLoadedSei() {
return this._onLoadedSei;
}
resetMediaInfo() {

@@ -1047,2 +1057,7 @@ this._mediaInfo = new MediaInfo();

let unit = {type: unitType, data: data};
if (unitType === 6) { // SEI TODO: change to 6
this._onLoadedSei && this._onLoadedSei(tagTimestamp, data);
}
units.push(unit);

@@ -1049,0 +1064,0 @@ length += data.byteLength;

@@ -256,2 +256,6 @@ /*

this._transmuxer.on(TransmuxingEvents.LOADED_SEI, (timestamp, data) => {
this._emitter.emit(PlayerEvents.LOADED_SEI, timestamp, data);
});
this._transmuxer.open();

@@ -258,0 +262,0 @@ }

@@ -24,5 +24,6 @@ /*

MEDIA_INFO: 'media_info',
STATISTICS_INFO: 'statistics_info'
STATISTICS_INFO: 'statistics_info',
LOADED_SEI: 'loaded_sei'
};
export default PlayerEvents;

@@ -52,6 +52,16 @@ import Player from 'xgplayer'

flv.play()
flv.on(Flv.Events.ERROR, (e) => {
player.emit('error', new Player.Errors('other', player.config.url))
})
flv.on(Flv.Events.LOADED_SEI, (timestamp, data) => {
player.emit('loaded_sei', timestamp, data);
})
flv.on(Flv.Events.STATISTICS_INFO, (data) => {
player.emit("statistics_info",data);
})
flv.on(Flv.Events.MEDIA_INFO, (data)=>{
player.mediainfo = data;
player.emit("MEDIA_INFO",data);
})
player.once('destroy', () => {

@@ -58,0 +68,0 @@ flv.destroy()

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc