でユーチューブビデオ結果を埋め込む:は、私は私のイオンアプリで動画を埋め込むしようとしているが、ページがロードされるとエラーが現れるCORSエラー
GET https://redirector.googlevideo.com/videoplayback?pcm2cms=yes&key=yt6&ei=5HE…QBGK&c=WEB&cver=1.20170425&cmo=pf=1&range=0-622&rn=15&playerretry=3&rbuf=0 404 (Not Found)
XMLHttpRequest cannot load https://redirector.googlevideo.com/videoplayback?pcm2cms=yes&key=yt6&ei=5HE…QBGK&c=WEB&cver=1.20170425&cmo=pf=1&range=0-622&rn=15&playerretry=3&rbuf=0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.youtube.com' is therefore not allowed access. The response had HTTP status code 404.
ここに私のhtmlコードは次のとおりです。
<iframe width="420" height="315" src="{{video}}" ></iframe>
ここ
はcontroller.jsコードです:
$scope.video = "https://www.youtube.com/embed/RP-mvJE9EQM";
私は私のapp.jsファイルでこれを追加しました:
$sceDelegateProvider.resourceUrlWhitelist(['self', new RegExp('^(http[s]?):\/\/(w{3}.)?youtube\.com/.+$')]);
と、この私のconfig.xmlファイル内:
<allow-navigation href="*.youtube.com" />
<preference name="AllowInlineMediaPlayback" value="true" />
は、どのように私はこれを解決するについて行くべきですか?私は何かが欠けていますか?
感謝を。私はindex.htmlでコード行を追加し、httpを使用していますが、それはまだ動作していません。 –