video.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:docs 作者: opendatakit 项目源码 文件源码
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]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号