XBMC单个视频播放脚本 /storage/.xbmc/userdata/autoexec.py 如下:
1 2 3 | #! /usr/bin/env python import xbmc xbmc.executebuiltin( "PlayMedia(/storage/videos/korobeniki.mp4)" ) |
改成使用播放列表的机制就可以实现循环功能了:
1 2 3 4 5 6 7 | #! /usr/bin/env python import xbmc playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) playlist.clear() playlist.add( "/storage/videos/korobeniki.mp4" ) xbmc.Player().play(playlist) xbmc.executebuiltin( "PlayerControl(RepeatOne)" ) |
本文内容来自 http://segmentfault.com/q/1010000000495024 并受 CC-BY 3.0 (中国大陆) 协议约束
本文内容来自 http://segmentfault.com/q/1010000000495024 并受 CC-BY 3.0 (中国大陆) 协议约束,请站长有时间加注一下文章来源 XD