simple addon for HLS stream
#1
I would like to create an addon for my channel that simply launches the HLS stream, no need for navigation or selection since there is only one stream.

I'm having trouble understanding where to start. I installed and modified the hello world example, but can't figure out what I need to include in the addon.py to launch the m3u8 stream.

This is what I have tried:
Code:
import sys
import xbmcgui
import xbmcplugin

addon_handle = int(sys.argv[1])

xbmcplugin.setContent(addon_handle, 'movies')

url = 'http://www.myserver.com/playlist.m3u8'
li = xbmcgui.ListItem('My First Video!', iconImage='DefaultVideo.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)

xbmcplugin.endOfDirectory(addon_handle)
Reply
#2
Code:
# -*- coding: utf-8 -*-

import xbmc

url = 'http://www.myserver.com/playlist.m3u8'
xbmc.Player().play(url)

that doesnt work ^^ ??
Reply
#3
That does work, thank you very much!
Reply
#4
np, also see -> http://mirrors.xbmc.org/docs/python-docs/ it has all(or not) you need to know about python in xbmc
Reply

Logout Mark Read Team Forum Stats Members Help
simple addon for HLS stream0