Jump to content

SSA/ASS subtitle support in JWplayer HELP please.


Publicaciones recomendadas

I found something that is supposed to work with JWplayer to enable SSA/ASS subtitles to work.      Could someone help me figure it out Heck would be great if they add it to the theme.      

https://github.com/libass/JavascriptSubtitlesOctopus

 

my current player script

<?php 
$episode_pagi = DDbmoviesHelpers::EpisodeNav($tmdbids,$temporad,$episode);
$next_episode = doo_isset($episode_pagi,'next');
$link_next = !empty($next_episode) ? 'href="'.$next_episode['permalink'].'" title="'.$next_episode['title'].'"' : 'href="#" class="nonex"';

?>
<!DOCTYPE html>
<html lang="en" dir="ltr" data-cast-api-enabled="true">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noindex">
        <title>JW Player</title>
        <script src='https://ssl.p.jwpcdn.com/player/v/8.6.2/jwplayer.js'></script>
        <script type="text/javascript">jwplayer.key="<?php echo $jw8key; ?>";</script>
        <script type="text/javascript">
            var jw = <?php echo json_encode($data)."\n"; ?>
        </script>
        <style type="text/css" media="all">
            html,body{padding:0;margin:0;height:100%}
            #player{width:100%!important;height:100%!important;overflow:hidden;background-color:#000}
        </style>
    </head>
    <body class="jwplayer">
        <div id="player"></div>
        <script type="text/javascript">
			const defaulGateway = "https://gateway.anime4all.net/ipfs/";
			let gateway;
			if(sessionStorage.getItem("ipfsGateway")) {
				gateway = sessionStorage.getItem("ipfsGateway");
			} else {
				gateway = defaulGateway;
			}
            const player = jwplayer('player').setup({
                image: jw.image,
                mute: false,
                volume: 100,
                autostart: jw.auto,
                repeat: false,
                abouttext: jw.text,
                aboutlink: jw.link,
                skin: {
                    active: jw.color
                },
                logo: {
                    file: jw.logo,
                    hide: true,
                    link: jw.link,
                    margin: '15',
                    position: jw.lposi
                },
                sources: [{
					file: gateway + "<?php echo $_GET['source'].'/index.m3u8'; ?>",
                    type: 'video/mp4'
                }],
				"cast": {}
            })
			player.on("complete", () => {
				console.log("video completed" + "<?php echo $next_episode; ?>");
				window.parent.eval(() => {
					window.parent.location.href = window.parent.nextEpisode;
				})()
			})
        </script>
    </body>
</html>

 

Enlace al comentario
Compartir en otros sitios web

×
×
  • Crear nuevo...