question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webview not playing videos

See original GitHub issue

I’ve the below that worked correctly in the browser, but it gives Invalid Source at webview:

<!doctype html>
<html>
    <body>
        <button onclick="external.invoke('open')">Run</button>
        <button onclick="external.invoke('close')">Close</button><br>
        <br>
        <video width="320" height="240" controls>
            <source src="c:/photos/file.webm" type="video/webm">
            // <source src="file.webm" type="video/webm">
        </video>
    </body>
</html>

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
hyousefGophercommented, Apr 28, 2020

So, now both image and video are working, but should be run/loaded from a server. Thanks for your support 👍

image

0reactions
hyousefGophercommented, Apr 28, 2020

It is working now:

  1. For the reading from file path: I wrote it before as c:\\... while it should be written as c:/..
  2. For reading from the server, I rewrote the full path as /static/lamp.jpg instead of lamp.jpg only

image

So, now back to our main point: playing videos 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

html video not playing in android webview - Stack Overflow
It happens when video is in a div, you should add these lines in your code: webView.getSettings().setDomStorageEnabled(true); webView.
Read more >
Videos in a webview doesn't play · Issue #1632 · react-native ...
no video works, no image, no sound, just an inifinite loading. Opening the same link in the device's default browser, the video starts...
Read more >
Videos stopped playing in Android Webview - Google Groups
I have a Android Webview application. Everything was working fine but then one day after some update in Android or Webview videos stopped...
Read more >
Not playing live hls videos anymore (h264) on WebView ...
Steps to reproduce: (1) Just try to open a HLS h264 live video (m3u8 manifest) on a WebView based app on Android TV...
Read more >
Problem with webview not playing video, only audio
-webview from the play store is installed -the youtube app : all works -the cm browser : videos from news sites do not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found