Reputation: 45
I really want to create a kivy app that lets me view videos from certain web links. How can I go about doing this, Like having a link to a video then play it in Kivy? I already read the documentation and I don't get it. Please help.
Upvotes: 3
Views: 7974
Reputation: 14804
The Video
and VideoPlayer
widgets are both capable of playing streaming videos from the web. Here's a simple example of playing a video from the web:
import kivy
kivy.require('1.8.0')
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
VideoPlayer:
source: 'http://www.debone.com/VivVilConGminorRV578.mpg'
''')
class TestApp(App):
def build(self):
return root
if __name__ == '__main__':
TestApp().run()
This will work for any supported streaming media type. Note, however, that YouTube does not provide streaming URLs. Check my answer here to a question which was specifically asking about YouTube.
Upvotes: 3