![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@avvio-reply/jplayer
Advanced tools
Writes image frames from stitched content to target canvas.
JPlayer is a configurable stills player to create highly flexible video playback. Finite control is possible through a 'frame event' mechanism.
Playback can be either forward or reverse, with options to loop, even down to a subset of frames if desired.
Event triggers can be configured by frame number or by custom naming allowing intuitive and descriptive event handlers to be written.
JPlayer requires Preloader and will include this when installed.
require('@avvio-reply/jplayer')(require('jquery'))
Define an object with one or more scenes with the following schema:
var root = '/content/images/scenes/'
, content = {
scenes: [
{
name: "<scene-name>", // key name of scene (some methods accept this name as identifier)
preload: 100, // percentage of resources that must be loaded before the scene is ready to play
motion: { // MOTION Schema:
catalog: root, // root of stitched image resources
sheetfrom: 1, // start of stitched image file range - stitched image resources must be named in numerical sequential order
sheetto: 29, // end of stitched image file range
sheetsize: 4, // the number of stills within the file - stills are assumed to be arranged left to right
framerate: 30, // playback number of frames per second for this scene
framewidth: 832, // width of a single frame within stitched files - all frames must have equal dimensions
frameheight: 468, // height of a single frame within stitched files - all frames must have equal dimensions
loop: false // True or False tells JPlayer whether to run through all frames in a continuous loop
},
events: { // EVENTS Schema:
custom: { // custom group of named events
<named-event-a>: [ 1 ], // named event providing the frame or frames that trigger the name
<named-event-b>: [ 116, 127 ] // named event providing the frame or frames that trigger the name
}
}
}
}
this.$canvas.jPlayer({
scenes: Config.content
, framerate: 20
, regulateFramerate: false
, frameEventCallback: function(e){
if (e.events.introStart) {
} else if (e.events.introOver) {
/* animated intro complete - load next question */
self.renderQuestion();
}
else if (e.events.resultStart){
self.assets['whistle'].play();
}
else if (e.events.resultKick){
self.assets['kick'].play();
}
else if (e.events.resultKnown){
/* ensure result audios are reset */
self.assets['goal'].pause();
self.assets['goal'].currentTime = 0;
self.assets['miss'].pause();
self.assets['miss'].currentTime = 0;
var result = self.isLastAnsweredCorrectly() ? 'goal' : 'miss';
if (self.assets[result])
self.assets[result].play();
/* update the score indicator */
$($('#bonusScoreList li').get(self.currentQuestion-1))
.addClass('is-' + result);
}
else if (e.events.resultOver) {
if (self.currentQuestion == 5){
endLoop = true;
setTimeout(function(){
location.href = '/';
}, 3500);
} else
{ /* re-run intro because another question is pending */
self.playScene('intro');
}
}
}
, preloadCallback: function(e){}
, endLoopCallback: function(e){}
, sceneCreatedCallback: function(e){}
, sceneReadyCallback: function(e){}
});
$('#user-canvas').jPlayer('play')
$('#user-canvas').jPlayer('stop')
$('#user-canvas').jPlayer('setSceneByNumber', newSceneNumber)
$('#user-canvas').jPlayer('setSceneByName', newSceneName)
$('#user-canvas').jPlayer('forward')
$('#user-canvas').jPlayer('reverse')
$('#user-canvas').jPlayer('toggle')
$('#user-canvas').jPlayer('playing')
$('#user-canvas').jPlayer('getScene')
Change the frame number during playback whether forward or reverse.
$('#user-canvas').jPlayer('setFrame', (int)newFrame)
Changes the current playback frame-rate (per second). Better results are possible when newRate divides evenly into 60
given HTML5 canvas is 60fps.
Option regulate is only effective when JPlayer is in differential mode. Regulate attempts to correct framerate syncing
with uneven framerates, such as 24fps.
$('#user-canvas').jPlayer('setFramerate', (int)newRate, (bool)regulate)
Returns object representing the load state of required resources as determined by the player configuration.
$('#user-canvas').jPlayer('getPreloadState')
Returns bool True/False whether the current scene is the first scene:
$('#user-canvas').jPlayer('isAtStart')
Returns bool True/False whether the current scene is the last scene:
$('#user-canvas').jPlayer('isAtEnd')
"@avvio-reply/jplayer": "file:///development/node/modules/jplayer"
FAQs
Stitched-frame player with custom event controls
We found that @avvio-reply/jplayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.