OpenELEC系统中自动循环播放视频的XBMC脚本,


XBMC单个视频播放脚本 /storage/.xbmc/userdata/autoexec.py 如下:

#! /usr/bin/env python
import xbmc
xbmc.executebuiltin( "PlayMedia(/storage/videos/korobeniki.mp4)" )

改成使用播放列表的机制就可以实现循环功能了:

#! /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 (中国大陆) 协议约束

文章标题:OpenELEC系统中自动循环播放视频的XBMC脚本 - 树莓派实验室 固定链接:https://shumeipai.nxez.com/2014/10/26/openelec-system-automatically-loop-video-of-xbmcscript.html

相关内容