我嵌入了一个Youtube IFrame,并通过JS使用IFrame API进行了加载。当我尝试播放某些视频时(尽管并非总是如此,通常似乎是包含受版权保护的音乐的视频),它只是显示“此视频不可用”。没有进一步的消息。这不是区域限制,因为当我尝试加载这些限制时,将显示该特定错误。这些视频在正常的YouTube页面上可以正常播放,因此我不知道是什么原因导致了此错误。有没有办法让这些视频嵌入到IFrame中或完全播放?我并不完全致力于IFrame API方法,让这些视频播放是我的第一要务。
编辑:我能够通过在YT.Player构造函数中指定videoId来解决此问题。我看到一致的行为,即在初始化时未指定videoId时视频将不可用,但如果指定了videoId则将播放它们。
In Haskell, find is designed to evaluate as a Maybe, because when scanning a list for an element matching a predicate, it could fail. However, consider the following:
factorize n | isPrime n = [n]\n | otherwise = m : factorize (n `div` m)\n where m = find ((==0) . (n `mod`)) [2..]\nRun Code Online (Sandbox Code Playgroud)\nfind here will clearly find a value in every case, assuming we\xe2\x80\x99re only hitting integers greater than 2. If a number is not prime, then …