Video 在OS X和iOS上通过Safari支持AirPlay

Video 在OS X和iOS上通过Safari支持AirPlay,video,safari,html5-video,airplay,Video,Safari,Html5 Video,Airplay,我有一个向订阅者播放视频的软件。我使用本机浏览器html5标记来实现这一点,它在所有主要浏览器中都能正常工作 对于Safari,我从Cloudfront上受保护的url提供了一个h.264 mp4文件,它可以很好地流到浏览器窗口 Airplay按钮显示在播放器控件中,您可以单击它来选择Airplay设备。当这种情况发生时,我会得到一个通用的播放错误,设备上不会播放任何内容 我已经检查了我的视频设置,它们似乎与视频匹配 以下是mp4变体的设置: General Complete name

我有一个向订阅者播放视频的软件。我使用本机浏览器html5
标记来实现这一点,它在所有主要浏览器中都能正常工作

对于Safari,我从Cloudfront上受保护的url提供了一个h.264 mp4文件,它可以很好地流到浏览器窗口

Airplay按钮显示在播放器控件中,您可以单击它来选择Airplay设备。当这种情况发生时,我会得到一个通用的播放错误,设备上不会播放任何内容

我已经检查了我的视频设置,它们似乎与视频匹配

以下是mp4变体的设置:

General
Complete name                            : /Users/ben/Desktop/movie.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 120 MiB
Duration                                 : 18mn 11s
Overall bit rate                         : 918 Kbps
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Writing application                      : Lavf56.40.101

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 18mn 11s
Bit rate                                 : 854 Kbps
Nominal bit rate                         : 800 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.031
Stream size                              : 111 MiB (93%)
Writing library                          : x264 core 146 r2555 0c21480
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=800 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 18mn 11s
Duration_LastFrame                       : -10ms
Bit rate mode                            : Constant
Bit rate                                 : 56.0 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 7.29 MiB (6%)
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
我错过了什么

更新


我构建了一个测试页面来尝试一些不同的视频格式,结果表明,如果我直接链接到一个视频,它可以正常工作,但如果浏览器重定向(这就是我的生产服务器的行为方式),它就不能工作。如果您有任何关于如何让AirPlay处理重定向的想法,我们将不胜感激。

如果您使用完全正常的mp4文件,应该不会有问题。