This repository was archived by the owner on Oct 15, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Pod/Classes/MediaPlayer/LMMediaItemStreamingCache Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ BasedOnStyle : WebKit
2+ UseTab : Always
3+ IndentWidth : 8
4+ PointerBindsToType : false
Original file line number Diff line number Diff line change 1+ //
2+ // LMMediaItemCache.h
3+ // LMMediaPlayer
4+ //
5+ // Created by Akira Matsuda on 10/13/14.
6+ // Copyright (c) 2014 Akira Matsuda. All rights reserved.
7+ //
8+
9+ #import < Foundation/Foundation.h>
10+ #import < AVFoundation/AVFoundation.h>
11+
12+ @interface LMMediaItemStreamingCache : NSObject <AVAssetResourceLoaderDelegate>
13+
14+ + (instancetype )sharedCache ;
15+
16+ @end
Original file line number Diff line number Diff line change 1+ //
2+ // LMMediaItemCache.m
3+ // LMMediaPlayer
4+ //
5+ // Created by Akira Matsuda on 10/13/14.
6+ // Copyright (c) 2014 Akira Matsuda. All rights reserved.
7+ //
8+
9+ #import " LMMediaItemStreamingCache.h"
10+ #import < AVFoundation/AVFoundation.h>
11+
12+ @interface LMMediaItemStreamingCache ()
13+
14+ @end
15+
16+ @implementation LMMediaItemStreamingCache
17+
18+ + (instancetype )sharedCache
19+ {
20+ static id sharedInstance;
21+ static dispatch_once_t onceToken;
22+ dispatch_once (&onceToken, ^{
23+ sharedInstance = [[[self class ] alloc ] init ];
24+ });
25+
26+ return sharedInstance;
27+ }
28+
29+ - (BOOL )isCacheAvailable : (NSString *)key
30+ {
31+ return NO ;
32+ }
33+
34+ #pragma mark - AVAssetResourceLoaderDelegate
35+
36+ - (BOOL )resourceLoader : (AVAssetResourceLoader *)resourceLoader shouldWaitForLoadingOfRequestedResource : (AVAssetResourceLoadingRequest *)loadingRequest
37+ {
38+ return YES ;
39+ }
40+
41+ - (void )resourceLoader : (AVAssetResourceLoader *)resourceLoader didCancelLoadingRequest : (AVAssetResourceLoadingRequest *)loadingRequest
42+ {
43+
44+ }
45+
46+ @end
You can’t perform that action at this time.
0 commit comments