移动端,PC,流媒体服务器如何结合实现视频直播?

awhono 2016-07-08 05:04:14
移动端,PC,流媒体服务器如何结合实现视频直播?

I needed an easy and efficient way to upload multipart form data (HTTP parameters and files) to a server, and I haven't found anything useful so far that suited my needs. I also needed that the upload got handled in the background and in the most efficient way on Android. More than that, I also needed to show upload status in the Android Notification Center.

So, after some research on the web I found that the best way to do this is to implement an IntentService and notify status with broadcast intents. This way the logic is decoupled from the UI and it's much more reusable. By using an IntentService, you can do multiple uploads being sure that they will be performed sequentially, and so you don't have to deal with the nightmare of concurrency. Also, an IntentService is much more efficient than an AsyncTask, it gets executed in the background and it's completely detached from the UI thread. If you need to show status in your UI, read further and you'll discover how to do it very easily.

简而言之,基于流媒体服务器的直播功能,实现移动端和PC的解决方案,下面一楼贴出PHP端的代码
...全文
2945 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
awhono 2016-07-08
  • 打赏
  • 举报
回复
Add the following to your project's AndroidManifest.xml file: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> Add the service to your project's AndroidManifest.xml file; service android:name="com.alexbbb.uploadservice.UploadService" android:enabled="true" android:exported="true" > <intent-filter> <action android:name="com.alexbbb.uploadservice.action.upload"/> </intent-filter> </service> <?php if ($_FILES["uploaded_file"]["error"] > 0) { echo "Error: " . $_FILES["uploaded_file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["uploaded_file"]["name"] . "<br>"; echo "Type: " . $_FILES["uploaded_file"]["type"] . "<br>"; echo "Size: " . ($_FILES["uploaded_file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["uploaded_file"]["tmp_name"]; } ?>
JEECMS内容管理系统是国内java开源CMS行业知名度最高、用户量最大的站群管理系统。 功能: 信息管理 ├ 文章 ├ 相册 ├ 多媒体 ├ 视频 ├ 下载 ├ 作品 ├ 产品 ├ 文库 ├ 招聘 互动信息 ├ 留言与反馈 ├ 评论 ├ 投票调查 ├ 在线调查问卷/答卷 ├ 通知公告 ├ 领导信箱 ├ 站内信 ├ 广告管理 用户与权限 ├ 用户管理 ├ 会员组管理 ├ 会员组权限管理 ├ 信息发布审批 ├ 会员浏览权限 ├ 部门管理 ├ 工作流 日志管理 ├ 操作日志 ├ 稿件操作日志 ├ 登录日志 ├ 工作量统计 统计功能 ├ 会员注册统计 ├ 内容统计 ├ 评论统计 ├ 留言统计 ├ PV统计 ├ 独立IP统计 ├ 独立访客统计 ├ 人均浏览次数统计 ├ 来访网站统计 ├ 来访页面统计 ├ 搜索关键字统计 ├ 受访页面统计 ├ 地区分布统计 ├ 统计初始化 发布与部署 ├ 文章静态化 ├ 全站静态化 ├ FTP同步 ├ 服务器分布部署 ├ 批处理 (批量移动文章/栏目、批量删除、批量上传图片/附件等) ├ 一键排版 ├ 定时任务 ├ tag自动提取 站点配置 ├ 网站参数配置 ├ 用户注册配置 ├ RSS配置 ├ RSS订阅 ├ TAG管理 ├ 文件上传配置 ├ 模板管理 ├ 自定义模板 ├ 可视化模板编辑 ├ 全文检索 ├ 友情链接管理 系统管理 ├ 内容关键字管理 ├ 自定义模型管理(自定义栏目/内容模型,一个栏目支持多种内容模型) ├ 网页信息采集 ├ 模块管理 ├ 数据备份与恢复 ├ 网站防火墙 ├ 附件管理 ├ 字典管理 ├ 国际化(前后台可以设置成多语言,目前系统自带后台英文操作菜单) ├ 系统支持PC端、移动端访问 网站群 ├ 节点维护 ├ 节点独立管理 ├ 站点信息共享管理 ├ 站点信息推送 ├ 全站搜索

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧