iOS play video


I've created a blank project (iOS) and put this in my viewDidLoad:
When the app starts all I get is a white screen with error messages in the log:
...and a bunch of lines regarding disabling autoplay. I especially don't understand the line about the view not being part of the hierarchy since it's a blank "Single View Application" iOS project and the code is in ViewController.m. It IS in the view hierarchy. I know for a fact that the movie file itself is not the problem because I got it from Apple's sample code on MPMoviePlayer. And although I (seemingly) tried everything written in the sample, I just couldn't get the player to work. Here is another try, this time with MPMoviePlayerController (not MPMoviePlayerViewController):
Similar result, with white screen and errors. Please help.... |
|||||||||||
|
Turns out all we have to do is this:
--------- EDIT: OR, if this is not working you can just do that following ----------
|
|||||||||||||
|
iOS play video的更多相关文章
- ios 安卓 video 取消播放自动全屏 属性
x-webkit-airplay="true",x5-playsinline="true",webkit-playsinline="true" ...
- 10个优秀的Objective-C和iOS开发在线视频教程
如果你自己开发iOS应用,你肯定会发现网上有很多资源.学习编程的一个最好的方法就是自己写代码,而开始写代码的最快的方式就是看其他人怎么写.我们从海量视频和学习网站中整理出了我 如果你自己开发iOS应用 ...
- 微信iOS WKWebview 网页开发适配指南
微信iOS客户端将于2017年3月1日前逐步升级为WKWebview内核,需要网页开发者提前做好网站的兼容检查和适配. 背景 WKWebView 是苹果在iOS 8中引入的新组件,目的是提供一个现代的 ...
- iOS苹果官方Demo合集
Mirror of Apple’s iOS samples This repository mirrors Apple’s iOS samples. Name Topic Framework Desc ...
- video 标签在微信浏览器的问题解决方法
最近做的些web页面,内嵌许多小视频,在ios和安卓手机上播放时,遇到不少问题: 在微信浏览器内播放时,视频会自动全屏 如果每个视频都有一张自定义的图片作为封面,在显示视频的同时,如果没有给这个视频设 ...
- iOS WKWebview 网页开发适配指南【转】
微信iOS客户端将于2017年3月1日前逐步升级为WKWebview内核,需要网页开发者提前做好网站的兼容检查和适配.如有问题,可参考文末联系方式,向我们咨询. 背景 WKWebView 是苹果在iO ...
- 10个优秀Objective-C和iOS开发在线视频教程
如果你自己开发iOS应用,你肯定会发现网上有很多资源.学习编程的一个最好的方法就是自己写代码,而开始写代码的最快的方式就是看其他人怎么写.我们从海量视频和学习网站中整理出了我们认为对你学习Object ...
- IOS 视频直播/智能家居(一行行敲代码,从零开始)lesson:1整体架构
本文转载至 http://blog.csdn.net/u014011807/article/details/47144027 前段时间由于工作需要做了一个视频直播/智能家居类的应用.算是对iOS音视频 ...
- iOS WKWebview 网页开发适配指南
iOS WKWebview 网页开发适配指南 微信iOS客户端将于2017年3月1日前逐步升级为WKWebview内核,需要网页开发者提前做好网站的兼容检查和适配.如有问题,可参考文末联系方式,向我们 ...
随机推荐
- linux 命令详解 sort
转自:https://www.cnblogs.com/51linux/archive/2012/05/23/2515299.html sort是在Linux里非常常用的一个命令,管排序的,集中精力,五 ...
- 【Python学习笔记】macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
http://www.cnblogs.com/xiongqiangcs/p/4914049.html pip install --upgrade pip sudo pip install numpy ...
- 安装ruby-pg报错解决
ruby用pgsql做orm的时候,需要安装ruby-pg库,默认编译安装会提示缺少xx头文件 max下,我用的傻瓜式pgsql.app gem install pg -- --with-pg-con ...
- Python 列表笔记
列表解析 squares = []for i in range(1,11): square = i**2 squares.append(square)print squares ########## ...
- NOIP2005普及组第3题 采药 (背包问题)
NOIP2005普及组第3题 采药 时间限制: 1 Sec 内存限制: 128 MB提交: 50 解决: 23[提交][状态][讨论版][命题人:外部导入] 题目描述 辰辰是个天资聪颖的孩子,他的 ...
- USB设备驱动总结
现象:把USB设备接到PC (韦老师总结) 1. 右下角弹出"发现android phone" 2. 跳出一个对话框,提示你安装驱动程序 问1. 既然还没有" ...
- 无法安装 Microsoft Visual Studio 2010 Service Pack 1
解决办法: 32 位系统删除:HKEY_LOCAL_MACHINE\Software\Microsoft\VSTO Designtime Setup\ 64 位系统删除:HKEY_LOCAL_MACH ...
- jenkins容器权限被拒绝
问题,我们从官网上面pull下jenkins后,如果直接运行容器的没问题 docker run -d -p 8080:8080 -v jenkins:latest 不过我们可能需要映射下容器内部的地址 ...
- uboot启动正常,加载内核kernel启…
先说现象吧:uboot能够正常启动,不过在kernel启动时却出现起不了的现象,停在这里 Uncompressing Linux.................................... ...
- 爬虫模块之Request
requests Requests唯一一个非转基因的Python HTTP库,人类就可以安全享用. Python标准库中提供了:urllib.urllib2.httplib等模块以供Http请求,但是 ...