【问题标题】:Why can't the seeking attribute work on the chrome browser..?? it works on IE however为什么寻求属性不能在 chrome 浏览器上工作..??但是它可以在 IE 上运行
【发布时间】:2019-11-19 15:38:04
【问题描述】:

我的模型代码是这样的

    content_type = models.ForeignKey(contentType, on_delete = models.CASCADE)
    content_subject = models.ForeignKey(Subject, on_delete = models.CASCADE)
    content_title = models.CharField(max_length=200)
    upload_content = models.FileField(upload_to=user_directory_path)

这是我的看法 但是 bk = Content.objects.get(id=id) 我如何将视频内容从数据库获取到站点 然后到模板

    list_of_subjects = Subject.objects.filter(grade=grade_id)
    subject_video = contentType.objects.filter(content_types = 'SubjectVideos')
    subject_video_list = Content.objects.filter(content_type__in=subject_video)

    bk = Content.objects.get(id=id)

    context={
        'list_of_subjects':list_of_subjects,
        'subject_video_list':subject_video_list,
        'bk': bk

    }
    return render(request,'bgcse/bgcse_subject_video_list.html',context)

然后我在我的 html 模板上使用了这个视频标签 类 video-fluid 等只处理视频大小和边距等

视频播放和工作正常,唯一的问题是在 chrome 上寻找


<video class="video-fluid z-depth-1" autoplay controlsList="nodownload"  controlsList="seeking">
<source src="{{bk.upload_content.url}}">
</video>
{% endblock %} ```

【问题讨论】:

    标签: python django


    【解决方案1】:

    由于 chrome 将 HTML5 作为默认值而不是 Flash (article)

    controlsListdocs上只能使用3种属性

    这三个是:

    "nodownload", "nofullscreen" and "noremoteplayback".
    

    如果你想关注这个answer,你可以使用自定义属性

    【讨论】:

    • 使用那些控件,seek 属性仍然不起作用
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-02
    相关资源
    最近更新 更多