GithubHelp home page GithubHelp logo

msx-html5xs's Introduction

msx-html5xs

Media Station X HTML5X player with styled subtitles.

That's a mod of the original HTML5X player that allows to replace subtitles with a custom element that accepts generic styles. The plugin allows to change margin, background, font and size of the subtitles.

This plugin was tested with a generic MP4 file with supplied VTT subtitles (except both Windows and Xbox UWP where it can't play this file from the remote server). It can play HLS in Safari (works) and on an Xbox (poor performance).

Usage

https://slonopot.github.io/msx-html5xs/html5xs.html?url={URL}

For example:

{
    "type": "pages",
    "headline": "HTML5XS Plugin Test",
    "template": {
        "type": "separate",
        "layout": "0,0,2,4",
        "icon": "msx-white-soft:extension",
        "color": "msx-glass",
        "playerLabel": "Sintel © copyright Blender Foundation | durian.blender.org",
        "action": "video:plugin:https://slonopot.github.io/msx-html5xs/html5xs.html?url=http://msx.benzac.de/media/sintel/sintel.mp4",
        "properties": {
            "resume:position": "102",
            "button:content:icon": "{context:contentIcon}",
            "button:content:action": "{context:contentAction}",
            "html5x:subtitle:en:English": "http://msx.benzac.de/media/sintel/en.vtt"
        }
    },
    "items": [
        {
            "title": "Test",
            "titleFooter": "Whatever",
            "contentIcon": "settings",
            "contentAction": "panel:request:player:options"
        }
    ]
}

The rest of the configuration is identical to the original plugin and can be found here.

Observations

When this plugin was being tested on localhost, the subtitles were loading straight up and the event rewrite was possible on launch. In production, however, the subtitles file is loaded only when selected and launched, it pops into handler with zero cues and I had to bind to oncuechange to change individual cue events once they are actually available.

The initial idea was to use this one with HLS streams (little did I know), and HLS stream player will load subtitles gradually which won't allow to add cue events once, this is now done every oncuechange which may be affecting performance.

On Xbox (UWP build) with HLS streams oncuechange will always have target with 0 or 1 cues, the one that was just loaded. In Safari, however, new cues will be appended to the end and this will allow the plugin to assign event and show items properly.

Shoutouts

Media Station X

The original plugin

This guy from stackoverflow

msx-html5xs's People

Contributors

slonopot avatar

Stargazers

 avatar benzac avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.