javascript - Make MediaElementJS work with Angularjs -
i'm making stream website , want play m3u8 in web embed player called mediaelement.js
i should use angularjs doesn't work! here's code:
html :
<script src="/static/libs/jquery/jquery.js"></script> <script src="/static/libs/mediaelement/mediaelement-and-player.min.js"> </script> <link rel="stylesheet" href="/static/libs/mediaelement/mediaelementplayer.min.css" /> <script type="text/javascript" src="/static/libs/mediaelement/hls_streams.js"></script> <img ng-src="{{imagesbaseurl}}{{recipe.bg_image}}" alt="cover"> <video controls name="media" class="sticky to-left to-top" id="video-{{recipe.id}}"> <source ng-init="loadmediaelement()" type="application/x-mpegurl" src="http://st.vasapi.click:1935/vod/__default__/smil:20a57a4c-1377-4fb8-b6cb-ec8e044650ac.smil/playlist.m3u8?wprefixendtime=1472459158&wprefixhash=hqfkboyjw5k7lavuft9t5ibzvoarbzxiunjbp0ljdlq%3d&wprefixstarttime=0" /> </video> <span class="play-button sticky" toggle-video="true"></span> <span class="pause-button sticky" toggle-video="false"></span>
controller :
$scope.loadmediaelement = function() { $('video').mediaelementplayer(/* options */); console.log('called'); };
but no luck! doing wrong??
Comments
Post a Comment