@@ -243,65 +243,41 @@ - (void)pictureInPictureController:(AVPictureInPictureController *)pictureInPict
243
243
244
244
- (void )jwplayerContentIsBuffering : (id <JWPlayer>)player
245
245
{
246
- // if (_parentView.playerViewController) {
247
- // [_parentView.playerViewController jwplayerContentIsBuffering:player];
248
- // }
249
-
250
246
if (_parentView.onBuffer ) {
251
247
_parentView.onBuffer (@{});
252
248
}
253
249
}
254
250
255
251
- (void )jwplayer : (id <JWPlayer>)player isBufferingWithReason : (enum JWBufferReason)reason
256
252
{
257
- // if (_parentView.playerViewController) {
258
- // [_parentView.playerViewController jwplayer:player isBufferingWithReason:reason];
259
- // }
260
-
261
253
if (_parentView.onBuffer ) {
262
254
_parentView.onBuffer (@{});
263
255
}
264
256
}
265
257
266
258
- (void )jwplayer : (id <JWPlayer>)player updatedBuffer : (double )percent position : (JWTimeData *)time
267
259
{
268
- // if (_parentView.playerViewController) {
269
- // [_parentView.playerViewController jwplayer:player updatedBuffer:percent position:time];
270
- // }
271
-
272
260
if (_parentView.onUpdateBuffer ) {
273
261
_parentView.onUpdateBuffer (@{@" percent" : @(percent), @" position" : time });
274
262
}
275
263
}
276
264
277
265
- (void )jwplayer : (id <JWPlayer>)player didFinishLoadingWithTime : (NSTimeInterval )loadTime
278
266
{
279
- // if (_parentView.playerViewController) {
280
- // [_parentView.playerViewController jwplayer:player didFinishLoadingWithTime:loadTime];
281
- // }
282
-
283
267
if (_parentView.onLoaded ) {
284
268
_parentView.onLoaded (@{});
285
269
}
286
270
}
287
271
288
272
- (void )jwplayer : (id <JWPlayer>)player isAttemptingToPlay : (JWPlayerItem *)playlistItem reason : (enum JWPlayReason)reason
289
273
{
290
- // if (_parentView.playerViewController) {
291
- // [_parentView.playerViewController jwplayer:player isAttemptingToPlay:playlistItem reason:reason];
292
- // }
293
-
294
274
if (_parentView.onAttemptPlay ) {
295
275
_parentView.onAttemptPlay (@{});
296
276
}
297
277
}
298
278
299
279
- (void )jwplayer : (id <JWPlayer>)player isPlayingWithReason : (enum JWPlayReason)reason
300
280
{
301
- // if (_parentView.playerViewController) {
302
- // [_parentView.playerViewController jwplayer:player isPlayingWithReason:reason];
303
- // }
304
-
305
281
if (_parentView.onPlay ) {
306
282
_parentView.onPlay (@{});
307
283
}
@@ -312,21 +288,13 @@ - (void)jwplayer:(id<JWPlayer>)player isPlayingWithReason:(enum JWPlayReason)rea
312
288
313
289
- (void )jwplayer : (id <JWPlayer>)player willPlayWithReason : (enum JWPlayReason)reason
314
290
{
315
- // if (_parentView.playerViewController) {
316
- // [_parentView.playerViewController jwplayer:player willPlayWithReason:reason];
317
- // }
318
-
319
291
if (_parentView.onBeforePlay ) {
320
292
_parentView.onBeforePlay (@{});
321
293
}
322
294
}
323
295
324
296
- (void )jwplayer : (id <JWPlayer>)player didPauseWithReason : (enum JWPauseReason)reason
325
297
{
326
- // if (_parentView.playerViewController) {
327
- // [_parentView.playerViewController jwplayer:player didPauseWithReason:reason];
328
- // }
329
-
330
298
if (_parentView.onPause ) {
331
299
_parentView.onPause (@{});
332
300
}
@@ -338,54 +306,34 @@ - (void)jwplayer:(id<JWPlayer>)player didPauseWithReason:(enum JWPauseReason)rea
338
306
339
307
- (void )jwplayer : (id <JWPlayer>)player didBecomeIdleWithReason : (enum JWIdleReason)reason
340
308
{
341
- // if (_parentView.playerViewController) {
342
- // [_parentView.playerViewController jwplayer:player didBecomeIdleWithReason:reason];
343
- // }
344
-
345
309
if (_parentView.onIdle ) {
346
310
_parentView.onIdle (@{});
347
311
}
348
312
}
349
313
350
314
- (void )jwplayer : (id <JWPlayer>)player isVisible : (BOOL )isVisible
351
315
{
352
- // if (_parentView.playerViewController) {
353
- // [_parentView.playerViewController jwplayer:player isVisible:isVisible];
354
- // }
355
-
356
316
if (_parentView.onVisible ) {
357
317
_parentView.onVisible (@{@" visible" : @(isVisible)});
358
318
}
359
319
}
360
320
361
321
- (void )jwplayerContentWillComplete : (id <JWPlayer>)player
362
322
{
363
- // if (_parentView.playerViewController) {
364
- // [_parentView.playerViewController jwplayerContentWillComplete:player];
365
- // }
366
-
367
323
if (_parentView.onBeforeComplete ) {
368
324
_parentView.onBeforeComplete (@{});
369
325
}
370
326
}
371
327
372
328
- (void )jwplayerContentDidComplete : (id <JWPlayer>)player
373
329
{
374
- // if (_parentView.playerViewController) {
375
- // [_parentView.playerViewController jwplayerContentDidComplete:player];
376
- // }
377
-
378
330
if (_parentView.onComplete ) {
379
331
_parentView.onComplete (@{});
380
332
}
381
333
}
382
334
383
335
- (void )jwplayer : (id <JWPlayer>)player didLoadPlaylistItem : (JWPlayerItem *)item at : (NSUInteger )index
384
336
{
385
- // if (_parentView.playerViewController) {
386
- // [_parentView.playerViewController jwplayer:player didLoadPlaylistItem:item at:index];
387
- // }
388
-
389
337
if (_parentView.onPlaylistItem ) {
390
338
NSMutableDictionary * sourceDict = [[NSMutableDictionary alloc ] init ];
391
339
for (JWVideoSource* source in item.videoSources ) {
@@ -432,10 +380,6 @@ - (void)jwplayer:(id<JWPlayer>)player didLoadPlaylistItem:(JWPlayerItem *)item a
432
380
433
381
- (void )jwplayer : (id <JWPlayer>)player didLoadPlaylist : (NSArray <JWPlayerItem *> *)playlist
434
382
{
435
- // if (_parentView.playerViewController) {
436
- // [_parentView.playerViewController jwplayer:player didLoadPlaylist:playlist];
437
- // }
438
-
439
383
if (_parentView.onPlaylist ) {
440
384
NSMutableArray * playlistArray = [[NSMutableArray alloc ] init ];
441
385
@@ -486,49 +430,38 @@ - (void)jwplayer:(id<JWPlayer>)player didLoadPlaylist:(NSArray<JWPlayerItem *> *
486
430
487
431
- (void )jwplayerPlaylistHasCompleted : (id <JWPlayer>)player
488
432
{
489
- // if (_parentView.playerViewController) {
490
- // [_parentView.playerViewController jwplayerPlaylistHasCompleted:player];
491
- // }
492
-
493
433
if (_parentView.onPlaylistComplete ) {
494
434
_parentView.onPlaylistComplete (@{});
495
435
}
496
436
}
497
437
498
438
- (void )jwplayer : (id <JWPlayer>)player usesMediaType : (enum JWMediaType)type
499
439
{
500
- // if (_parentView.playerViewController) {
501
- // [_parentView.playerViewController jwplayer:player usesMediaType:type];
502
- // }
440
+
503
441
}
504
442
505
443
- (void )jwplayer : (id <JWPlayer>)player seekedFrom : (NSTimeInterval )oldPosition to : (NSTimeInterval )newPosition
506
444
{
507
- // if (_parentView.playerViewController) {
508
- // [_parentView.playerViewController jwplayer:player seekedFrom:oldPosition to:newPosition];
509
- // }
510
-
511
445
if (_parentView.onSeek ) {
512
446
_parentView.onSeek (@{@" from" : @(oldPosition), @" to" : @(newPosition)});
513
447
}
514
448
}
515
449
516
450
- (void )jwplayerHasSeeked : (id <JWPlayer>)player
517
451
{
518
- // if (_parentView.playerViewController) {
519
- // [_parentView.playerViewController jwplayerHasSeeked:player];
520
- // }
521
-
522
452
if (_parentView.onSeeked ) {
523
453
_parentView.onSeeked (@{});
524
454
}
525
455
}
526
456
527
457
- (void )jwplayer : (id <JWPlayer>)player playbackRateChangedTo : (double )rate at : (NSTimeInterval )time
528
458
{
529
- // if (_parentView.playerViewController) {
530
- // [_parentView.playerViewController jwplayer:player playbackRateChangedTo:rate at:time];
531
- // }
459
+
460
+ }
461
+
462
+ - (void )jwplayer : (id <JWPlayer>)player updatedCues : (NSArray <JWCue *> * _Nonnull)cues
463
+ {
464
+
532
465
}
533
466
534
467
#pragma mark - JWPlayer Ad Delegate
0 commit comments