有没有什么办法知道,如果一个YouTube视频显示广告?通过API? [英] Is there any way to know if a youtube video display ads? via API?
问题描述
一些YouTube视频都有那些广告在屏幕底部的视频显示。有什么我可以找出哪些影片已经这类广告?
Some youtube videos has those ads show up on video at the bottom of the screen. Is there any which I can find out which videos have these kind of ads?
推荐答案
您可以使用具有的方法,如onAdStarted()的监听器服务。
全部开发文档:<一href=\"https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer.PlayerStateChangeListener\" rel=\"nofollow\">https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer.PlayerStateChangeListener
You can use the listener services which have methods such as onAdStarted(). Full dev doc: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer.PlayerStateChangeListener
这篇关于有没有什么办法知道,如果一个YouTube视频显示广告?通过API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!