Given Some Conditions,
When A Certain Action-is-Taken or Specific-Stimulus-Occurs,
It Results In This Unexpected Situation/Response
iOS SDK 3.9.0
iOS 13.3
// Not mine, forgot to whom to give the credit. :( | |
import Foundation | |
/// Allows `collection.safe.whatever`. Mimics usage of AVFoundation's `collection.lazy.whatever` | |
public struct SafeCollection<Base : Collection> { | |
private var _base: Base | |
public init(_ base: Base) { | |
_base = base |
/** | |
* Give Int, CGFloats, and Floats a `doubleValue` property, like `NSNumber`.`doubleValue` | |
Original By Erica Sadun, (Swift Cookbook recipe 5-1), found here: https://gist.github.com/erica/2f6a38c844573c778b0f | |
Subsequent mutilations by Amitai Blickstein | |
*/ | |
//: Numbers that convert to other types | |
public protocol ConvertibleNumberType: DoubleRepresentable, NumberInitAble {} |
// | |
// AudioInterruptionMonitor.swift | |
// QueuePlayer | |
// | |
// Created by Afifi, Mohamed on 4/29/19. | |
// Copyright © 2019 Quran.com. All rights reserved. | |
// | |
// originally DL'ed from https://github.com/quran/quran-ios/blob/master/QueuePlayer/AudioInterruptionMonitor.swift | |
import AVFoundation |
// | |
// NSObject+LogProperties.h | |
// JWPlayer-SDK-iOS-Demo | |
// | |
// Created by Amitai Blickstein on 6/15/19. | |
// Copyright © 2019 JWPlayer. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0"> | |
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll"> | |
<vmap:AdSource id="preroll-ad" allowMultipleAds="false" followRedirects="true"> | |
<AdTagURI templateType="vast3"> | |
<![CDATA[preroll.xml]]> | |
</AdTagURI> | |
</vmap:AdSource> | |
</vmap:AdBreak> | |
<vmap:AdBreak timeOffset="50%" breakType="linear" breakId="midroll"> | |
<vmap:AdSource id="overlay-1-ad" allowMultipleAds="false" followRedirects="true"> |
class PrettyPrinter { | |
static func print(json tryJSON: Any) -> String { | |
var result = "\(tryJSON)" | |
do { | |
guard JSONSerialization.isValidJSONObject(tryJSON) else { return result } | |
let data = try JSONSerialization.data(withJSONObject: tryJSON, options: .prettyPrinted) | |
guard let string = String(data: data, encoding: .utf8) else { return result } | |
result = string | |
} | |
catch { |
func onConnected(to device: JWCastingDevice) { | |
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { | |
self.castController.cast() | |
} | |
} |
WEBVTT | |
NOTE This file was exported by MacCaption version 7.0.12 to comply with the WebVTT specification dated March 27, 2017. | |
01:00:09.306 --> 01:00:12.876 align:middle line:-1 position:31% size:43% | |
- Hello again, it's Winged | |
Nation presented by Sage Fruit. | |
01:00:12.876 --> 01:00:14.611 align:middle line:-1 position:50% size:33% | |
Talking sprint car racing, |
// | |
// AudioInterruptionMonitor.swift | |
// JWPlayerDemo | |
// | |
// Created by Amitai Blickstein | |
// Copyright © 2019. All rights reserved. | |
// | |
// Credit: Code modified from Mohamed Afifi -> | |
// https://github.com/quran/quran-ios/blob/master/QueuePlayer/AudioInterruptionMonitor.swift |