Ninja Pokémon Master

    @thoughtsunificator/mediaplayer-streaming

    1.0.11 • Public • Published

    mediaplayer-streaming Build Status

    Streaming component for mediaplayer.

    Getting started

    Prerequisites

    Installing

    • npm install @thoughtsunificator/mediaplayer-core

    Usage

    import { Core }  from "domodel"
    import { Player, PlayerBinding, PlayerModel } from "@thoughtsunificator/mediaplayer-core"
    import { StreamingModel, StreamingBinding } from "@thoughtsunificator/mediaplayer-streaming"
    
    
    window.addEventListener("load", async function() {
    
    	const player = new Player()
    	const hotkeys = {
    		38: "some event",
    	}
    
    	Core.run(PlayerModel, {
    		parentNode: document.body,
    		binding: new PlayerBinding({
    			player,
    			hotkeys,
    			model: StreamingModel,
    			binding: new StreamingBinding({ player })
    		})
    	})
    
    	player.emit("media url set", "./resource/trailer.mp4")
    
    })

    Events

    Name Target
    media url set Player
    hud show Player
    hud hide Player
    video volumechange Player
    video play Player
    video pause Player
    video playback toggle Player
    video volume toggle Player
    screenshot Player
    video time set Player
    video skip backward Player
    video skip forward Player
    video speed increase Player
    video speed decrease Player
    video volume toggle Player
    video volume set Player
    video mute set Player
    video durationchange Player
    video loadeddata Player
    video progress Player
    video loadeddata Player
    video seeked Player
    video timeupdate Player
    video volumechange Player

    Demo

    See https://github.com/thoughtsunificator/mediaplayer-streaming-demo.

    Keywords

    none

    Install

    npm i @thoughtsunificator/mediaplayer-streaming

    DownloadsWeekly Downloads

    1

    Version

    1.0.11

    License

    MIT

    Unpacked Size

    28 kB

    Total Files

    31

    Last publish

    Collaborators

    • thoughtsunificator