2015-12-20, 10:13
Hello.
I have following plugin code (small cut of interesting part):
And it works fine. Variable streamurl contain http url to remote m3u8 file. And it must be like that. I do not have other data like in rtmp streams.
So it is other way to play HTTP m3u stream and get display some thumbnail from http url also in window on left of side of stream name in player window?
Ofcourse I know code to play RTMP streams and there listitem can show thumbnail image, but using code like below I cannot play HTTP streams like m3u.
Please give me some code example. Thanks in advance.
I have following plugin code (small cut of interesting part):
Code:
###.....
addon = xbmcaddon.Addon()
path = addon.getAddonInfo('path')
fname = path + 'temp.m3u'
file = open(fname, 'w')
file.write('#EXTINF:0,' + dispnm + '\n')
file.write(streamurl)
file.close()
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
playlist.clear()
playlist.add(fname)
xbmc.Player().play(playlist)
os.remove(fname)
So it is other way to play HTTP m3u stream and get display some thumbnail from http url also in window on left of side of stream name in player window?
Ofcourse I know code to play RTMP streams and there listitem can show thumbnail image, but using code like below I cannot play HTTP streams like m3u.
Code:
def playMedia(title, thumbnail, link, mediaType='Video'):
li = xbmcgui.ListItem(label=title, iconImage=thumbnail, thumbnailImage=thumbnail, path=link)
li.setInfo(type=mediaType, infoLabels={ "Title": title })
xbmc.Player().play(item=link, listitem=li)