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

bigscreen-player

Package Overview
Dependencies
Maintainers
1
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigscreen-player - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "bigscreen-player",
"version": "1.0.2",
"version": "1.0.3",
"description": "Simplified media playback for bigscreen devices.",

@@ -5,0 +5,0 @@ "main": "script/bigscreenplayer.js",

@@ -70,4 +70,3 @@ require(

['initialize', 'getDebug', 'getSource', 'on', 'off', 'time', 'duration', 'attachSource',
'reset', 'isPaused', 'pause', 'play', 'seek', 'isReady', 'refreshManifest', 'getDashMetrics', 'getMetricsFor',
'setBufferToKeep', 'setBufferAheadToKeep', 'setBufferTimeAtTopQuality', 'setBufferTimeAtTopQualityLongForm']);
'reset', 'isPaused', 'pause', 'play', 'seek', 'isReady', 'refreshManifest', 'getDashMetrics', 'getMetricsFor']);

@@ -509,4 +508,29 @@ mockDashInstance.duration.and.returnValue(101);

});
describe('sliding window', function () {
beforeEach(function () {
setUpMSE(0, WindowTypes.SLIDING, MediaKinds.VIDEO);
mseStrategy.load(null, null, 0);
});
it('should set current time on the video element', function () {
mseStrategy.setCurrentTime(12);
expect(mockVideoElement.currentTime).toBe(12);
});
it('should clamp the seek to the start of the seekable range', function () {
mseStrategy.setCurrentTime(-0.1);
expect(mockVideoElement.currentTime).toBe(0);
});
it('should clamp the seek to 1.1s before the end of the seekable range', function () {
mseStrategy.setCurrentTime(101);
expect(mockVideoElement.currentTime).toBe(99.9);
});
});
});
});
});

@@ -127,8 +127,2 @@ define('bigscreenplayer/playbackstrategy/msestrategy',

mediaPlayer.getDebug().setLogToBrowserConsole(false);
mediaPlayer.setBufferToKeep(0);
mediaPlayer.setBufferAheadToKeep(20);
mediaPlayer.setBufferTimeAtTopQuality(20);
mediaPlayer.setBufferTimeAtTopQualityLongForm(20);
mediaPlayer.initialize(mediaElement, src, true);

@@ -282,6 +276,8 @@ }

var seekToTime = getClampedTime(time, this.getSeekableRange());
if (windowType === WindowTypes.SLIDING) {
mediaElement.currentTime = (time + timeCorrection);
mediaElement.currentTime = (seekToTime + timeCorrection);
} else {
mediaPlayer.seek(getClampedTime(time, this.getSeekableRange()));
mediaPlayer.seek(seekToTime);
}

@@ -288,0 +284,0 @@ }

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