Loading
Hi
I’m trying to develop an Air app which includes downloading and playing youtube videos
I have a tilelist of thumbnails and a player which plays the selected version
The event is
protected function videoList_clickHandler(event:MouseEvent):void
{
player.cueVideoById(videoList.selectedItem.actualID);
}
Some videos play fine both in flashbuilder and the compiled air app but others throw the 150 player error which is apparently when the video requested does not allow playback in the embedded player. However, if I go to the youtube site, there is no problem obtaining the embedded code and applying it successfully. The videos I have problems with work fine on web sites like http://www.yvoschaap.com/youtube/
Examples of actualID : works xTFNdHqwiQY; fails SRcnnId15BA
The youtube prefix is http://www.youtube.com/watch?v=
TIA
asked Nov 16, 2010 at 17:57
You’ll receive error 150 when embedding videos that need age verification and for videos that have other restrictions in your country.
If you load the videos in the non-chromeless player, you will see the real error message. You can try that here: http://code.google.com/apis/youtube/youtube_player_demo.html
To get only the search results that you can actually play, search with the following parameters:
- format=5 (only return embeddable videos)
- safeSearch=strict
- restriction=[your IP or country code]
See http://code.google.com/apis/youtube/2.0/reference.html for more information
answered Mar 4, 2011 at 2:26
iddqdiddqd
7007 silver badges21 bronze badges
Если вы получаете код ошибки YouTube 150, это может быть вызвано несколькими проблемами. Поэтому вам необходимо определить, в чем проблема, прежде чем искать пути ее решения. К сожалению, единственная помощь, которую вы получите, это сообщение «Видео недоступно».
Есть ли исправление для ошибки YouTube 150?
Код ошибки YouTube 150 обычно возникает при попытке просмотра встроенного видео. Когда встроенное видео загружается, вы увидите серый экран с ошибкой и сообщением «Видео недоступно». К сожалению, это не помогает диагностировать проблему.
Ошибка YouTube 150 может быть вызвана следующими причинами:
- Канал отключил встраивание.
- Присутствуют возрастные ограничения.
- YouTube не работает.
- YouTube API не работает.
- YouTube изменил формат URL.
- Сторонний плеер заблокирован или требует обновления.
В большинстве случаев лучшим решением этой проблемы является просмотр контента непосредственно на YouTube. Это позволяет обойти необходимость встраивания. В качестве альтернативы можно зайти на YouTube и перезагрузить страницу с вставкой. К сожалению, причины ошибки с кодом 150 обычно связаны с самим сервисом или настройками канала, загрузившего видео. Таким образом, вы не сможете сделать ничего, кроме вышеуказанных предложений.
Гайды
11 мая 2023
0
(1 170 голосов)
Если вы получаете код ошибки YouTube 150, это может быть вызвано несколькими проблемами. Из-за этого вам нужно сузить круг проблем, прежде чем вы сможете найти решение. К сожалению, единственная помощь, которую вы получите, — это сообщение «Видео недоступно».
Код ошибки YouTube 150 обычно возникает при попытке просмотра встроенного видео. Когда вставка загружена, вы просто увидите серый экран с ошибкой и сообщением «Видео недоступно». К сожалению, это не помогает диагностировать проблему.
Ошибка YouTube 150 может быть вызвана следующими причинами:
- Канал отключил встраивание.
- Присутствуют возрастные ворота.
- Ютуб не работает.
- API YouTube не работает.
- YouTube изменил формат URL.
- Сторонний плеер заблокирован или требует обновления.
В большинстве случаев лучшим решением этой проблемы является прямой просмотр контента на YouTube. Это полностью исключает необходимость встраивания. Кроме того, вы можете войти в YouTube и перезагрузить страницу с встраиванием. К сожалению, причины ошибки с кодом 150 обычно связаны с самой службой или настройками канала, который загрузил видео. Таким образом, вы не можете сделать ничего, кроме приведенных выше предложений.
Here’s what I found so far:
Error Overview
youtube_player_flutter
uses Youtube IFrame API for embedding Youtube player using flutter_webview, and the IFRAME API is producing the error. Here’s the link to view all the errors that the player may receive: https://developers.google.com/youtube/iframe_api_reference#Events
The ones associated with Error 150 are:
101
– The owner of the requested video does not allow it to be played in embedded players.
150
– This error is the same as 101. It’s just a 101 error in disguise!
Which means the video owners have disabled the videos to be played embedded.
Video Metadata
I tried checking the embeddable
, restricted
and other properties of videos which were not working using the YouTube Data API to get the key:
https://www.googleapis.com/youtube/v3/videos?id=[VIDEO_ID]&key=[API_KEY]&part=snippet,contentDetails,status
I couldn’t find any difference in the metadata of the videos which were blocked and unblocked.
Error Reporting
In the RawYoutubePlayer
widget internally used by the plugin, on error occurrence, error code (e.g. 150) is set as the value for controller.value
here:
name: ‘Errors’, | |
onMessageReceived: (JavascriptMessage message) { | |
controller.updateValue( | |
controller.value | |
.copyWith(errorCode: int.tryParse(message.message) ?? 0), | |
); | |
}, |
I think controller.value
could be monitored for error reporting and handling, though better handling using onError
method exposed, and some info in the documentation would be very helpful too.