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
// | |
// AVAsset+VideoOrientation.h | |
// | |
// Created by Luca Bernardi on 19/09/12. | |
// Copyright (c) 2012 Luca Bernardi. All rights reserved. | |
// | |
#import <AVFoundation/AVFoundation.h> | |
typedef enum { | |
LBVideoOrientationUp, //Device starts recording in Portrait |
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
extension AVAsset { | |
func videoOrientation() -> (orientation: UIInterfaceOrientation, device: AVCaptureDevicePosition) { | |
var orientation: UIInterfaceOrientation = .Unknown | |
var device: AVCaptureDevicePosition = .Unspecified | |
let tracks :[AVAssetTrack] = self.tracksWithMediaType(AVMediaTypeVideo) | |
if let videoTrack = tracks.first { | |
let t = videoTrack.preferredTransform |
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
// | |
// CXEImageToVideo.swift | |
// VideoAPPTest | |
// | |
// Created by Wulei on 16/12/14. | |
// Copyright © 2016年 wulei. All rights reserved. | |
// | |
import Foundation | |
import AVFoundation |
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
package main | |
import ( | |
"crypto/rand" | |
"crypto/subtle" | |
"encoding/base64" | |
"errors" | |
"fmt" | |
"log" | |
"strings" |
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 SwiftUI | |
import PlaygroundSupport | |
struct showArt: View { | |
@Binding var isPlaying: Bool | |
var body: some View { | |
VStack { | |
VStack { | |
RoundedRectangle(cornerRadius: 16) | |
.shadow(color: Color(UIColor.black.withAlphaComponent( isPlaying ? 0.3 : 0.1)), radius: 20, x: 0, y: 10) |