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内核,需要网页开发者提前做好网站的兼容检查和适配.如有问题,可参考文末联系方式,向我们 ...
随机推荐
- java向数据库插入时间
tbUrsMember.setMemberRegisterTime(new Date(System.currentTimeMillis()));
- 生产环境连接数据库失败:Cannot create PoolableConnectionFactory❨Got mins one from a read call❩
生产环境发现有接口调不通,而且集中在两个节点,其他节点都没问题.抓取日志发现报错如下: Context initialization failed. org.springframework. bean ...
- fuser
fuser 命令,查看正在被占用的文件:
- 微信小程序之if操作
.wxss控制样式 .price-agent{ font-size: 25rpx; color:#ababab; float: left; position: absolute; bottom: 0; ...
- shulti模块简述
#-*- coding:utf-8 -*- __author__ = "MuT6 Sch01aR" import shutil shutil.copyfileobj('D:\\3. ...
- java成神之——集合框架之ArrayList,Lists,Sets
集合 集合种类 ArrayList 声明 增删改查元素 遍历几种方式 空集合 子集合 不可变集合 LinkedList Lists 排序 类型转换 取交集 移动元素 删除交集元素 Sets 集合特点 ...
- openstack 租户ip 手动配置 openstack静态租户ip
作者:[吴业亮]云计算开发工程师 博客:http://blog.csdn.net/wylfengyujiancheng 1.综述: 在日常开发和生产环境中经常需要将OpenStack虚拟机配置一个静态 ...
- List<T>集合使用总结
- VxWorks多任务功能
http://blog.chinaunix.net/uid-23741326-id-84935.html VxWorks的任务有优先级的概念,其任务调度也是基于优先级考虑的,是抢占式的,VxWorks ...
- 使用axis2进行WebService的开发
使用axis2进行WebService的开发 Apache Axis2 是 Apache Axis SOAP 项目的后继项目.此项目是 Web 服务核心引擎的重要改进,目标是成为 Web 服务和面向服 ...