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
class UserMediaDetector { | |
// Returns info on all user media devices in successful promise resolve. | |
getDevices() { | |
return new Promise((resolve, reject) => { | |
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) { | |
reject(Error("UserMediaDetector getDevices failed: enumerateDevices is not supported")); | |
return; | |
} |
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
class UserMediaDetector { | |
// Returns info on all user media devices. | |
async devices() { | |
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) { | |
throw(Error("UserMediaDetector getDevices failed: enumerateDevices is not supported")); | |
} | |
const mediaDevices = await navigator.mediaDevices.enumerateDevices(); |
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
// StreamManager | |
// Useful for creating user media streams and tearing them back down. | |
// | |
class StreamManager { | |
constructor() { | |
this._stream = null; | |
this._constraints = null; | |
} | |
get stream() { |
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
class StreamRecording { | |
constructor(stream, mimeTypes = StreamRecording.DefaultMimeTypes) { | |
this._stream = null; | |
this._mimeType = null; | |
this._recordedBlobs = []; | |
this._buildMediaRecorder(stream, mimeTypes); | |
} | |
get stream() { |
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
import AWS from "aws-sdk"; | |
import config from "config"; | |
import uuidV4 from "uuid/v4"; | |
import querystring from "querystring"; | |
class RemoteStorageService { | |
constructor() { | |
this._apiVersion = "2011-06-15"; | |
this._s3 = new AWS.S3({ |
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
import parseUrl from 'url-parse' | |
/* What's with this file? | |
* | |
* This file is a hacked version of the `getGatsbyImageProps.ts` file provided | |
* by `gatsby-source-sanity` at: | |
* https://github.com/sanity-io/gatsby-source-sanity/blob/main/src/images/getGatsbyImageProps.ts. | |
* | |
* There are existing lacks in functionality at the time of this code being | |
* written that are having detrimental impacts on our ability to get acceptable |
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
import Combine | |
import Foundation | |
/// AnyPublisher.All | |
/// | |
/// Implementation of `AnyPublisher.all`. Takes an array of `AnyPublisher` | |
/// objects which must all conform to the specified `Output` and `Error` types. | |
/// | |
/// func foo() -> AnyPublisher<Int, Never> { | |
/// return Deferred { |
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
// | |
// RefreshableScrollView.swift | |
// -- | |
// | |
// Created by Bradley on 3/24/21. | |
// | |
import Combine | |
import SwiftUI | |
import UIKit |
OlderNewer