<A href ... to mp4 video in android.

4 posts, 0 answers
  1. MVG Europa
    MVG Europa avatar
    3 posts
    Member since:
    Sep 2013

    Posted 30 Sep 2013 Link to this post

    Hello,

    I have an app using kendo mobile, with several links to external videos (.mp4), coded like this:
    <a href="#:VideoFile#" style='text-decoration: none'>
                        Link</a>

    - it works fine in iPhone (opens quicktime).

    In Android nothing happen on click.

    Notes:
    - when I open the same URL on chrome in android the video plays normaly.
    - when I link/href to anything else than a video, the link works.

    Does anyone had this problem before?

    Thanks.
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2891 posts

    Posted 02 Oct 2013 Link to this post

    Hello guys,

    Could you please specify the Android version of your test device?
    I tested the scenario with Samsung Nexus S Phone (Android 4.1.2) and got everything to work as expected. When the link is clicked, a native pop up will show asking the user which program he would like to use to open the video file.

    For your convenience I prepared a small sample:
    In case you are using older version of Android, please verify that the build-in browser supports video links.
    You can do that by testing the same code but without Kendo Mobile application - just comment out the line which initializes the application and remove Kendo UI resources from the header.

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. MVG Europa
    MVG Europa avatar
    3 posts
    Member since:
    Sep 2013

    Posted 04 Oct 2013 Link to this post

    Hi,

    An important thing I forgot to mention in the first post.
    We are doing this in an application generated by Icenium.

    We tryed ours and your code directly on the browser of the android and it worked. 
    But it still doesn't work in the Icenium generated app, even without the kendo mobile application, so maybe this is a bug of Icenium and not a bug of kendo.

    We tryed in all the android available, all of them with 4.1.2, a Samsung and two xPeria and in all of them the problem persists.
    No href redirection to the video on Icenium app, and redirection ok in the browser.
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Oct 2013 Link to this post

    Hi,

    While video might work in a regular browser via hyperlink, the Android WebView is quite different and limited in comparison, and the behaviour you observe is expected. You can either test the HTML 5 audio/video support (not supported on all OS) or also try the Cordova Capture and Media API and see if those work for you. We've had partial success with embedding the video in iframe as well, see this forum post for more info.

    To sum up, video support is inconsistent at best in the Android webview. You can try to use the approached listed in this post and if they do not help, report the problem to the Cordova guys, so they can post their expertise on this matter.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top