无需越狱或安装应用在 iPhone 和 iPad 上打开 Flash 视频

iPhone 和 iPad 本身不支持 Flash,有一种办法是安装支持 Flash 的 App,如 Frash。我看到国外朋友介绍的一种方法,可以不用越狱或安装应用,这里翻译出来分享一下。

方法:

用 iPad 或 iPhone 的浏览器如 Safari 访问

http://code.google.com/p/itransmogrify/

点击页面接近末尾的 “right from your iPhone” 链接。

到达这个新页面,其实就是一个详细的介绍,这里把重点操作说一下:
把当前的网址添加到 Safari 收藏夹里,名字可以用默认的 iTransmogrify。
编辑刚刚添加的这个书签,点击第二行的网址栏,用 iPad 的文本选择功能,一直拖到整行的最左边,看上去像下面这样

http://joemaller.com/___?javascript:if%28typ ...

然后选中从最左边开始直到 javascript 之前的问号,不包括 javascript 字样,把选中的文字删掉,这样书签就编辑好了。
然后访问带有 Flash 内容的网站,此时 Flash 内容不能显示,点击刚刚添加的 iTransmogrify 书签,当前的网址不会改变,但是 Flash 内容会显示出来。顺利的话,再打开其它带 Flash 内容的网站应该也能显示,如果再遇到不能显示 Flash 的,只需再点击一下 iTransmogrify 书签就行了。

下面再简单探讨一下它的原理,本质上这是以书签方式运行的一小段 JavaScript 代码,它的完整代码如下:

http://joemaller.com/___?javascript:if%28typeof%28iTransmogrify%29%3D%3D%27undefined%27%29%7Bvar%20s%3Ddocument.createElement%28%27script%27%29%3Bs.src%3D%27http%3A%2F%2Fjoemaller.com%2FiTransmogrify-latest.js%3Fq%3D%27%2B%28new%20Date%29.getTime%28%29%3Bdocument.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28s%29%7Dvoid%280%29


它的作用就是在当前页面加载进来一个外部 js 文件,其地址是

http://joemaller.com/iTransmogrify-latest.js

我们可以把这个 js 文件下载下来再仔细看,雪峰大体看了一下,它的原理似乎是把播放 Flash 的插件仿冒成 iPad 本身支持的插件,如 QuickTime,当然为了实现此仿冒还要做很多接口控件映射等等。可能个别 Flash 的控件不能完全映射到 QuickTime 上,所以用上述方法看 Flash 时有个别小功能没有,比如土豆视频的主视频可以看,但是两侧的广告都不显示。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1.<html> 2.<body> 3.<% 4. //SysDownloadFlashFashion等于0时就是本地下载 5. if(SysDownloadFlashFashion==0){%> 6. <div id="LoGo" solid #606080;cursor:pointer;" align="center"> 7. <div id="hideMarquee">正在检测插件<br><br></div> 8. <marquee id="marquee" 0px; white-space: nowrap;border:1px solid #606080;' direction="right" scrollamount=20 height='20' width='220'> 9. <div>■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■</div> 10. </marquee> 11. </div> 12. <div id="Chrome" 13. <%}else{%> 14. <div id="Chrome"> 15. <%}%> 16. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 17. id="uploadfile" width="800" height="435" 18. <%if(SysDownloadFlashFashion==1){%> 19. codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" 20. <%}else{ %> 21. codebase"plugins"> 22. <% } %> 23. <param name="wmode" value="opaque" /> 24. <param name="movie" value="uploadfile.swf" /> 25. <param name="quality" value="high" /> 26. <param name="bgcolor" value="#869ca7" /> 27. <param name="allowScriptAccess" value="sameDomain" /> 28. <embed src="uploadfile.swf" wmode="opaque" quality="high" bgcolor="#869ca7" 29. width="800" height="435" name="uploadfile" align="middle" id="uploadfile" 30. play="true" 31. loop="false" 32. quality="high" 33. allowScriptAccess="sameDomain" 34. type="application/x-shockwave-flash" 35. <%if(SysDownloadFlashFashion==1){%> 36. pluginspage="http://www.adobe.com/go/getflashplayer" 37. <% }else{%> 38. pluginspage="<%=context%>/plugins/Install_Flash_Player_9_Plugin.exe"> 39. <% } %> 40. </embed> 41. </object> 42. </div> 43.</body> 44.[removed] 45.var tishi=0; 46.function InstallFlash() 47.{ 48. if((brower().isIE) || (brower().isIE7) || (brower().isIE8) && <%=SysDownloadFlashFashion%>==0) 49. { 50. LoGo.onclick=function() 51. { 52. if(tishi==0) 53. { 54. [removed].href="plugins/install_flash_player_10_active_x.exe"; 55. alert(message.uploadfile_js_IE_plugins_downLoad_remind); 56. tishi=-1; 57. } 58. } 59. } 60. if(brower().isFirefox && <%=SysDownloadFlashFashion%>==0) 61. { 62. uploadfile.onclick=function() 63. { 64. if(tishi==0) 65. { 66. [removed].href="plugins/Install_Flash_Player_9_Plugin.exe"; 67. alert(message.uploadfile_js_fireFox_plugins_downLoad_remind); 68. tishi=-1; 69. } 70. } 71. } 72. if(brower().isChrome && <%=SysDownloadFlashFashion%>==0) 73. { 74. Chrome.onmouseover=function() 75. { 76. if(tishi==0) 77. { 78. [removed].href="plugins/Install_Flash_Player_9_Plugin.exe"; 79. alert(message.uploadfile_js_Chrome_plugins_downLoad_remind); 80. tishi=-1; 81. } 82. } 83. } 84.} 85.[removed] 86.[removed] 87.var swf = false; 88.if((brower().isIE) || (brower().isIE7) || (brower().isIE8)) 89.{ 90. try 91. { 92. swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');//IE已经安装Flash插件 93. if(swf) 94. { 95. LoGo.style.display="none"; 96. Chrome.style.display="block"; 97. } 98. } 99. catch(e)//没有安装Flash插件 100. { 101. swf = false; 102. marquee.style.display="none"; 103. hideMarquee[removed]=message.uploadfile_js_hideMarquee_remind; 104. hideMarquee.style.cursor="hand"; 105. } 106.} 107.else if((brower().isFirefox) || (brower().isChrome)) 108.{ 109. LoGo.style.display="none"; 110. Chrome.style.display="block"; 111. swf = navigator.plugins["Shockwave Flash"];//FireFox,Chrome 112.} 113.if(!swf) 114.{ 115. InstallFlash(); 116.} 117.[removed] 118.</html>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值