首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

跨域资源共享的各种方式(持续更新)

在客户端编程语言中,如JavaScript和ActionScript,同源策略是一个很重要的安全理念,它在保证数据的安全性方面有着重要的意义。同源策略规定跨域之间的脚本是隔离的,一个域的脚本不能访问和操作另外一个域的绝大部分属性和方法。那么什么叫相同域,什么叫不同的域呢?当两个域具有相同的协议(如http), 相同的端口(如80),相同的host(如www.example.org),那么我们就可以认为它们是相同的域。比如http://www.example.org/index.html和http://www.example.org/sub/index.html是同域,而http://www.example.org, https://www.example.org, http://www.example.org:8080, http://sub.example.org中的任何两个都将构成跨域。同源策略还应该对一些特殊情况做处理,比如限制file协议下脚本的访问权限。本地的HTML文件在浏览器中是通过file协议打开的,如果脚本能通过file协议访问到硬盘上其它任意文件,就会出现安全隐患,目前IE8还有这样的隐患。

03

Tutorial: How to "live stream" a media file

I have tried a while to setup a free (open source etc.) live streaming solution which is able to stream “anything” to a flash frontend. The basic idea is to stream TV from v4l2 (and similar), but I also wanted to stream files (movies). I found that most tutorials only show how to setup the streaming or only show how to get a flash player up and running. The whole roundtrip is not really described and has its own difficulties. This tutorial describes the whole “roundtrip” from a media file on your disk to displaying it in a browser. I know that there are easier ways to send a media file to some player in a browser and I also know that playing a file is not really live streaming. (This is why I have put it in double quotes.) However, it shows the principle and it might be easier to set this up as a first step.

02

Swf转mp4+mp4转gif等格式的方法

我们都知道swf文件(ShockwaveFlash的简称,读作swiff)在前几年是非常火的,由于他是基于矢量绘图的flash动画文件,他的图像效果,交互效果等都非常出色,而且文件本身还很小巧,尤其适合在网页端进行显示,以至于很多的演示视频,甚至小游戏都是用swf文件来保存的。不过近几年随着Html5的发展,他在移动端的优点渐渐消失,甚至很多浏览器也开始不支持flash插件。而且如果在电脑上运行还得额外安装flash player,很是麻烦。比如很多情况下,我们还是需要在网页中播放swf文件进行演示,或者将这个swf文件放到另外一台电脑中播放,这样我们还得搞定用户浏览器是否支持flash插件或者另外一台电脑是否安装了flash player。因此最方便的做法就是提前把swf文件转化为mp4视频文件进行播放,甚至是直接制作成动态图片的效果。

02
领券