a video player framework aims to bring wonderful experience on browser
immediate
as true
Please download this version with follow command
npm install chimee@next
$autoFocus
You can change plugin's autoFocus setting whenever you want.
To get the package, install like follow
npm install chimee@next
videoRequiredGuardedAttributes
useStyleFullscreen
on global configIn some situation, the browser's fullscreen api do not perform well. We can use css to simulate fullscreen. You can just set useStyleFullscreen
to be true
like this:
Chimee.config.useStyleFullscreen = true;
You can download this version through this command.
npm install chimee@next
export kernelEvents.
You can install this version like this:
npm install chimee@next --save-dev
In this version, we make a refactor on our event system, which can help us to solve the problem described in https://github.com/Chimeejs/chimee/issues/106 and https://github.com/Chimeejs/chimee/issues/102.
We now can pass in event option to provide more info for event.
The event options including two parameter, target
and stage
, they are both optional.
target means the target you need to listen on, you can value below.
'kernel' | 'container' | 'wrapper' | 'video' | 'video-dom' | 'plugin' | 'esFullscreen'
For example, you used to listen on container by c_
.
// what you used to do
player.on('c_click', event => console.log(event));
// what you can do now
player.on('click', event => console.log(event), { target: 'container' });
stage means the event stage, it includes 'before' | 'main' | 'after' | '_'
so you can listen on before play event
like this:
// what you used to do
player.on('beforePlay', event => console.log(event));
// what you can do now
player.on('play', event => console.log(event), { stage: 'before' });
So you can clarify the target of your event emit.
player.emit({
name: 'click',
target: 'container',
});
In some situation, the developer may create their own kernel events. So we provide a new interface for developer to register events.
But we can just register kernel events now.
import Chimee from 'chimee'
Chimee.registerEvents({
name: 'test',
target: 'kernel',
});
object.keys
instead of object.entries
to avoid bug on chrome 65