可以禁用“在 Youtube 上观看"关联? [英] Possible to disable "Watch on Youtube" link?

查看:28
本文介绍了可以禁用“在 Youtube 上观看"关联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个应用程序,在其中嵌入视频和视频剪辑的特定部分.例如,它看起来像这样

I am building an app where I am embedding videos and specific sections of video clips. For example, it looks like this

<iframe width="640" height="360" src="https://www.youtube.com/embed/pftnJbQjSBA&modestbranding=1&showinfo=0&autoplay=1&controls=0&modestbranding=1&disablekb=1&rel=0&start=10&end=20" frameborder="0"></iframe>

是否可以禁用在 youtube 上观看"链接,以便用户最终不会导航到其他地方.明确地说,我只想在观看视频时控制流量(即不试图干扰广告或 YouTube 徽标).

Is it possible to disable "Watch on youtube" link so the user doesn't end up navigating elsewhere. Just to be clear, I only want to control the flow while the video is being watched (i.e not trying to interfere with ads or YouTube logo).

推荐答案

有可能,只需将 &modestbranding=1 添加到您的嵌入代码中即可.

It is possible, just add &modestbranding=1 to your embed code.

观看:https://www.youtube.com/watch?v=4NFgV_Et9gY

例如

<object width="800" height="450" data="http://www.youtube.com/v/@Model.YoutubeId&rel=0&modestbranding=1"></object>

请注意,当用户的鼠标指针悬停在播放器上时,一个小的 YouTube 文本标签仍会显示在暂停的视频的右上角.

Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user's mouse pointer hovers over the player.

详细了解 YouTube 的 iFrame Player API.

这篇关于可以禁用“在 Youtube 上观看"关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆