2017-08-19, 04:11
When I try to play stream files with .ts extension (live stream), the video plays only about 20 to 30 seconds and ends playback.
If I try to play the same link through the 'f4mTester' addon, the video stream is continuous.
Is it possible to play stream with .ts extension continuously without using the addon: 'f4mTester'?
A part of the code:
If I try to play the same link through the 'f4mTester' addon, the video stream is continuous.
Is it possible to play stream with .ts extension continuously without using the addon: 'f4mTester'?
A part of the code:
Code:
def addLink(url,name,iconimage,fanart,total):
mode = '12'
u = sys.argv[0]+'?url='+urllib.quote_plus(url)+"&mode="+mode+"&iconimage="+iconimage
ok = True
isFolder=False
liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
liz.setProperty("Fanart_Image", fanart)
liz.setProperty('IsPlayable', 'true')
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,totalItems=total,isFolder=isFolder)
return ok
def parse_m3u(data):
stream_url = 'http://iptv_link.ts'
#stream_url = 'plugin://plugin.video.f4mTester/?streamtype=TSDOWNLOADER&url=http://iptv_link.ts&name;=CHANNEL_name'
channel_name = 'myName'
thumbnail = 'myImg'
total = 1
addLink(stream_url, channel_name,thumbnail,'',total)
if mode==None:
mainMenu()
elif mode==12:
if not url.startswith("plugin://plugin"): #Run only 30 seconds :
item = xbmcgui.ListItem(path=url)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
else:
#Run f4mTester, continuous
xbmc.executebuiltin('XBMC.RunPlugin('+url+')')