SJVideoPlayer是否可以支持m3u8加密和不加密视频下载,以及下载后播放本地的m3u8视频 #399

2021-01-24 10:14:43

参考地址 是否可以支持m3u8加密和不加密视频下载,以及下载后播放本地的m3u8视频 #399

你的新功能建议是否牵扯到某个常见的问题?
比如,在开发中,经常遇到XXX问题,目前框架的功能不足以解决这个问题

你希望达到的效果
比如,我希望框架能够帮助我解决XXX问题,实现XXXX那样的效果

你能考虑到的可选实现方案
描述一下你认为要实现这个功能,有哪些可行的一些实现方案?

@Liyongcong Liyongcong added the feature label 11 days ago

@Liyongcong Liyongcong changed the title 是否可以支持m3u8加密和不加密视频下载 是否可以支持m3u8加密和不加密视频下载,以及下载后播放本地的m3u8视频 11 days ago

@changsanjiang

 

Owner

changsanjiang commented 11 days ago

是AES加密的吗?

@Liyongcong

 

Author

 Liyongcong commented 11 days ago

@changsanjiang

 

Owner

changsanjiang commented 11 days ago

AVPlayer 本身就支持的.

如果你想要边下边播, 可以配合这个库使用: https://github.com/changsanjiang/SJMediaCacheServer

@changsanjiang changsanjiang closed this 11 days ago

@Liyongcong

 

Author

 Liyongcong commented 11 days ago

@changsanjiang

 

Owner

changsanjiang commented 11 days ago

本地m3u8一般是开个本地代理去播放的. 试试用这个库下载和播放吧 https://github.com/changsanjiang/SJM3U8Downloader

@Liyongcong

 

Author

 Liyongcong commented 11 days ago

@Liyongcong

 

Author

 Liyongcong commented 11 days ago

@changsanjiang

 

Owner

changsanjiang commented 8 days ago

已修 SJM3U8Downloader 0.0.5

@Liyongcong

 

Author

 Liyongcong commented 8 days ago

@Liyongcong

 

Author

 Liyongcong commented 8 days ago

@changsanjiang

 

Owner

changsanjiang commented 8 days ago

  1. 可以临时扩展如下:

#import "SJM3U8DownloadListItem.h"#import <objc/message.h>////// 添加自定义字段///@interface SJM3U8DownloadListItem (TestExtended)@property (nonatomic, copy, nullable) NSString *name;@property (nonatomic, copy, nullable) NSString *title;@end@implementation SJM3U8DownloadListItem (TestExtended)
- (void)setName:(NSString *)name {    objc_setAssociatedObject(self, @selector(name), name, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (NSString *)name {    return objc_getAssociatedObject(self, _cmd);
}

- (void)setTitle:(NSString *)title {    objc_setAssociatedObject(self, @selector(title), title, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (NSString *)title {    return objc_getAssociatedObject(self, _cmd);

}@end
  1. 添加下载时, 设置值

    NSString *url = nil;    NSInteger idx = [SJM3U8DownloadListController.shared addItemWithUrl:url];
    SJM3U8DownloadListItem *item = (id)[SJM3U8DownloadListController.shared itemAtIndex:idx];
    item.delegate = self;
    item.name = @"asdfds";    // ..
    // ..
    item.title = @"adsafsd";
    [SJM3U8DownloadListController.shared updateContentsForItemAtIndex:idx];
  1. 视频下载完成后, 这条数据就会从SJM3U8DownloadListController中删除, 需要在代理方法中保存到自己的数据库中

- (void)downloadItemStateDidChange:(SJM3U8DownloadListItem *)item {    if ( item.state == SJDownloadStateFinished ) { 
          // .. 保存到自己的数据库中
    }
}

@Liyongcong

 

Author

 Liyongcong commented 8 days ago

@changsanjiang

 

Owner

changsanjiang commented 8 days ago

可以

@Liyongcong

 

Author

 Liyongcong commented 8 days ago


  • 2017-02-10 15:19:51

    Git:代码冲突常见解决方法

    如果系统中有一些配置文件在服务器上做了配置修改,然后后续开发又新添加一些配置项的时候, 在发布这个配置文件的时候,会发生代码冲突:

  • 2017-02-10 15:24:14

    linux学习之——vim简明教程

    学习 vim 并且其会成为你最后一个使用的文本编辑器。没有比这个更好的文本编辑器了,非常地难学,但是却不可思议地好用。 我建议下面这四个步骤: 存活 感觉良好 觉得更好,更强,更快 使用VIM的超能力

  • 2017-02-10 16:22:13

    git历史记录查询

    查看提交历史:git log 查看提交历史并显示版本间的差异:git log -p 查看指定历史:git log xxx(sha1值) -p 查看提交历史(指定时间):

  • 2017-02-13 17:50:05

    cURL error 60: SSL certificate problem: unable to get local issuer certificate

    Drupal 8 version uses Guzzle Http Client internally, but under the hood it may use cURL or PHP internals. If you installed PHP cURL on your PHP server it typically uses cURL and you may see an exception with error Peer certificate cannot be authenticated with known CA certificates or error code CURLE_SSL_CACERT (60).