如何在 Android 中获取 HTML5 视频标签 src 属性的值
我的应用程序有一个 WebView。 WebView HTML 具有:
<video id="player" src="rtsp://somesite/videofile.mp4" >Video content</video>
如何从此 HTML 获取 src 属性?
我想要这个视频的 URI。它需要在我的视频播放器中播放。我不想使用 VideoView。
My application have a WebView. The WebView HTML has:
<video id="player" src="rtsp://somesite/videofile.mp4" >Video content</video>
How can I get the src
attribute from this HTML?
I want to have the URI of this video. It's needed to play in my video player. I don't want to use VideoView.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以:
如果您想从 WebView 中获取值,请使用
Java 类中的 setSrc 方法。
You can:
If you want to get the value out of your WebView, use
setSrc
is a method in your Java class.