forked from valtech-sd/react-native-video
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add checking values statements * Add video codec * Add library to code itself to fix problem with spaces in uri
- Loading branch information
1 parent
0f0c12d
commit a6823bb
Showing
37 changed files
with
4,254 additions
and
1,537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Sun Jin <jeansunvf@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// M3U8ExtXByteRange.h | ||
// M3U8Kit | ||
// | ||
// Created by Frank on 2020/10/1. | ||
// Copyright © 2020 M3U8Kit. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface M3U8ExtXByteRange : NSObject | ||
|
||
- (instancetype)initWithAtString:(NSString *)atString; | ||
- (instancetype)initWithLength:(NSInteger)length offset:(NSInteger)offset; | ||
|
||
@property (nonatomic, assign, readonly) NSInteger length; | ||
@property (nonatomic, assign, readonly) NSInteger offset; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// M3U8ExtXByteRange.m | ||
// M3U8Kit | ||
// | ||
// Created by Frank on 2020/10/1. | ||
// Copyright © 2020 M3U8Kit. All rights reserved. | ||
// | ||
|
||
#import "M3U8ExtXByteRange.h" | ||
|
||
@implementation M3U8ExtXByteRange | ||
|
||
- (instancetype)initWithAtString:(NSString *)atString { | ||
NSArray<NSString *> *params = [atString componentsSeparatedByString:@"@"]; | ||
NSInteger length = params.firstObject.integerValue; | ||
NSInteger offset = 0; | ||
if (params.count > 1) { | ||
offset = MAX(0, params[1].integerValue); | ||
} | ||
|
||
return [self initWithLength:length offset:offset]; | ||
} | ||
|
||
- (instancetype)initWithLength:(NSInteger)length offset:(NSInteger)offset { | ||
self = [super init]; | ||
if (self) { | ||
_length = length; | ||
_offset = offset; | ||
} | ||
return self; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// M3U8ExtXKey.h | ||
// M3U8Kit | ||
// | ||
// Created by Pierre Perrin on 01/02/2019. | ||
// Copyright © 2019 M3U8Kit. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
@interface M3U8ExtXKey : NSObject | ||
|
||
- (instancetype)initWithDictionary:(NSDictionary *)dictionary; | ||
|
||
- (NSString *)method; | ||
- (NSString *)url; | ||
- (NSString *)keyFormat; | ||
- (NSString *)iV; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// M3U8ExtXKey.m | ||
// M3U8Kit | ||
// | ||
// Created by Pierre Perrin on 01/02/2019. | ||
// Copyright © 2019 M3U8Kit. All rights reserved. | ||
// | ||
|
||
#import "M3U8ExtXKey.h" | ||
#import "M3U8TagsAndAttributes.h" | ||
|
||
@interface M3U8ExtXKey() | ||
@property (nonatomic, strong) NSDictionary *dictionary; | ||
@end | ||
|
||
@implementation M3U8ExtXKey | ||
|
||
- (instancetype)initWithDictionary:(NSDictionary *)dictionary { | ||
if (self = [super init]) { | ||
self.dictionary = dictionary; | ||
} | ||
return self; | ||
} | ||
|
||
- (NSString *)method { | ||
return self.dictionary[M3U8_EXT_X_KEY_METHOD]; | ||
} | ||
|
||
- (NSString *)url { | ||
return self.dictionary[M3U8_EXT_X_KEY_URI]; | ||
} | ||
|
||
- (NSString *)keyFormat { | ||
return self.dictionary[M3U8_EXT_X_KEY_KEYFORMAT]; | ||
} | ||
|
||
- (NSString *)iV { | ||
return self.dictionary[M3U8_EXT_X_KEY_IV]; | ||
} | ||
|
||
- (NSString *)description { | ||
return self.dictionary.description; | ||
} | ||
|
||
@end |
Oops, something went wrong.