def run(self):
autoplay = None
controls = "controls"
loop = None
muted = "muted"
poster = None
preload = None
cl = None
if "autoplay" in self.options:
autoplay = yes_no("autoplay",self.options["autoplay"])
if "controls" in self.options:
controls = yes_no("controls",self.options["controls"])
if "loop" in self.options:
loop = yes_no("loop",self.options["loop"])
if "muted" in self.options:
muted = yes_no("muted",self.options["muted"])
if "poster" in self.options:
poster = directives.uri(self.options["poster"])
if "preload" in self.options:
preload = preload_choice(self.options["preload"])
if "class" in self.options:
cl = self.options["class"]
uri = directives.uri(self.arguments[0])
vid = video_node(uri = uri, autoplay = autoplay, controls = controls,
loop = loop, muted = muted, poster = poster,
preload = preload, cl = cl)
self.state.nested_parse(self.content, self.content_offset, vid)
return [vid]
评论列表
文章目录