Video not woking on android

4 replies [Last post]
Joined: 12/13/2011
Points: 9

I am trying to develop web page that can display a video on android phone.I have configured streaming server and i used this line of code as given in demonstration.
--see the attachment for the code--
When i test this page on pc browser it plays the video perfectly.But when i brows it through my android phone it does not even display the player.Also on pc when i click the " Force Mobile Safari" link it disappear the player. My video stream server and the web application is not accessible from the outside of the local area network.Is that the problem? or am i doing it wrong?Thanks for any help.

 

AttachmentSize
test.doc28 KB
Joined: 05/13/2009
Points: 164

I'm having difficulties troubleshooting this because my computer can't find a server at
http://videosys.mobitel.lk/ where I believe the stream is streaming from: http://videosys.mobitel.lk/index.php/kwidget/cache_st/1323169644/wid/_10...

Since you're using your own Kaltura server, it's important that you set the html5 library to use that server for it's api calls instead of using the default Kaltura SaaS. For the sample below I've set the api host as http://videosys.mobitel.lk . See http://html5video.org/wiki/KalturaHTML5:Kaltura.ServiceUrl for more information.

Additionally I have commented out the analytics monitoring code because the monitorEvent function is not included in your demo and all calls to the $j jquery should happen within an mw.ready event.

Assuming the server is behind a firewall the following may work now (though just for you), but livestreaming to a html5 desktop browser will have to be done within flash as the html5 library does not (at this point in time) support live streaming via html5--on android, iOS, and blackberry, the stream should be handled by the native player.

<!DOCTYPE html>
<html>
        <head>
                <script type="text/javascript" src="http://html5.kaltura.org/js"></script>
                <script type="text/javascript">
                        if( document.URL.indexOf('forceMobileHTML5') != -1 ){
                                mw.setConfig( 'forceMobileHTML5' , true );
                        }
                        mw.setConfig({
                                'Kaltura.ServiceUrl' : 'http://videosys.mobitel.lk',
                                // Path to Kaltura service base usually /api_v3/index.php?service=
                                'Kaltura.ServiceBase' : '/api_v3/index.php?service=',
                                // Path that hosts your assets ( in late versions of onPrem, mediafiles
                                // are served via playManifest rather than directly pointing to the cdn,
                                // but the cdn url is still used for thumbnails )
                                'Kaltura.CdnUrl' : 'http://videosys.mobitel.lk'
                        });
                        //mw.setConfig( 'EmbedPlayer.OverlayControls', false );
                        //$j( mw ).bind( 'Kaltura.SendAnalyticEvent', function( monitorEvent ){
                        //$j('#analyticsLog').append( monitorEvent + "\n");
                        //});
</script>
</head>
<body>
        <h2> Fall forward: ( kaltura embed code on iPad / iPhone ) + analytics </h2>
        <a href="?forceMobileHTML5"> Force Mobile Safari</a> for testing with desktop chrome and safari.
        <br />
        <div style="position:absolute;top:90px;left:450px;width:300px;height:300px;" >
                <i>Analytics events:</i> ( only html5 )<br />
                <textarea id="analyticsLog" cols='40' rows='24' ></textarea>
        </div>
        <object id="kaltura_player_1323169558"
               type="application/x-shockwave-flash" name="kaltura_player_1323169558"
               allowFullScreen="true" allowNetworking="all"
               allowScriptAccess="always" height="330" width="400"
               data="http://videosys.mobitel.lk/index.php/kwidget/cache_st/1323169644/wid/_100/uiconf_id/4421526/entry_id/0_sujxartn">
                <param name="allowFullScreen" value="true" />
                <param name="allowNetworking" value="all" />
                <param name="allowScriptAccess" value="always" />
                <param name="bgcolor" value="#000000" />
                <param name="flashVars" value="&" />
                <param name="movie" value="http://videosys.mobitel.lk/index.php/kwidget/cache_st/1323169644/wid/_100/uiconf_id/4421526/entry_id/0_sujxartn" />
                <a href="http://corp.kaltura.com">video platform</a>
                <a href="http://corp.kaltura.com/technology/video_management">video management</a>
                <a href="http://corp.kaltura.com/solutions/overview">video solutions</a>
                <a href="http://corp.kaltura.com/technology/video_player">video player</a>
        </object>
</body>
</html>

Please, in the future, attach samples as html files or inline with the code BBCode braces.

Joined: 12/13/2011
Points: 9

Thank you very much for the help.I will try this after reading.Thanks again...

Joined: 12/13/2011
Points: 9

I applied your code given and it succeeded somewhat ,but to avoid difficulties of my own kalthura server i changed my video for stream server supplied by "kulthura" for trial basis.And i remove the lines of configuration to my own server .Now i can View the video by the Pc browser through "Force Mobile Safari " also.And when i brows through it my android device it happens nothing except load the capture image.

here is my android code :

        v =(WebView)findViewById(R.id.webView1);
                v.setWebViewClient(new myClient());
                v.getSettings().setJavaScriptEnabled(true);
                v.loadUrl("http://MypubicIP:8080/vidtest/hik.jsp");  

And here is my new web page.

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="http://html5.kaltura.org/js"></script>
        <script type="text/javascript">
            if( document.URL.indexOf('forceMobileHTML5') != -1 ){
                mw.setConfig( 'forceMobileHTML5' , true );
            }

        </script>
    </head>
    <body>
        <h2> Fall forward: ( kaltura embed code on iPad / iPhone ) + analytics </h2>
        <a href="?forceMobileHTML5"> Force Mobile Safari</a> for testing with desktop chrome and safari.
        <br />
        <div style="position:absolute;top:90px;left:450px;width:300px;height:300px;" >
            <i>Analytics events:</i> ( only html5 )<br />
            <textarea id="analyticsLog" cols='40' rows='24' ></textarea>
        </div>

        <script type="text/javascript" src="http://www.kaltura.com/p/806582/sp/80658200/embedIframeJs/uiconf_id/6470722/partner_id/806582"></script>
       
        <object id="kaltura_player_1323844681" name="kaltura_player_1323844681"
       type="application/x-shockwave-flash" allowFullScreen="true"
       allowNetworking="all" allowScriptAccess="always" height="333"
       width="400" bgcolor="#000000" xmlns:dc="http://purl.org/dc/terms/"
       xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video"
       resource="http://www.kaltura.com/index.php/kwidget/cache_st/1323844681/wid/_806582/uiconf_id/6470722/entry_id/0_4l0z0y9o"
       data="http://www.kaltura.com/index.php/kwidget/cache_st/1323844681/wid/_806582/uiconf_id/6470722/entry_id/0_4l0z0y9o">
            <param name="allowFullScreen" value="true" /><param name="allowNetworking" value="all" />
            <param name="allowScriptAccess" value="always" /><param name="bgcolor" value="#000000" />
            <param name="flashVars" value="&{FLAVOR}" />
            <param name="movie" value="http://www.kaltura.com/index.php/kwidget/cache_st/1323844681/wid/_806582/uiconf_id/6470722/entry_id/0_4l0z0y9o" />
            <a href="http://corp.kaltura.com">video platform</a>
            <a href="http://corp.kaltura.com/video_platform/video_management">video management</a>
            <a href="http://corp.kaltura.com/solutions/video_solution">video solutions</a>
            <a href="http://corp.kaltura.com/video_platform/video_publishing">video player</a>
            <a rel="media:thumbnail" href="http://cdnbakmi.kaltura.com/p/806582/sp/80658200/thumbnail/entry_id/0_4l0z0y9o/width/120/height/90/bgcolor/000000/type/2"></a>
            <span property="dc:description" content=""></span>
            <span property="media:title" content="Normal web quality video (400kbps)"></span>
            <span property="media:width" content="400"></span>
            <span property="media:height" content="333"></span>
            <span property="media:type" content="application/x-shockwave-flash"></span>
        </object>
    </body>
</html>

What is wrong with this? please help me on this.
thanks & BR.

Joined: 12/13/2011
Points: 9

Any suggestions?