録画 https://www.youtube.com/watch?v=jgnYTbSbR7E
https://speakerdeck.com/taminif/weblioying-hui-hua-to-dong-zuo-tietukuturu-webrtckun
- 今年の3/1からwebrtcに移行する、全面移行
- skyway使っている
- 最近skywayパッケージがnpmに登録されてた
| // 出力先判定 | |
| static func IsHeadSetConnected() -> Bool{ | |
| let route = AVAudioSession.sharedInstance().currentRoute; | |
| for desc in route.outputs | |
| { | |
| let portType = desc.portType; | |
| if (portType == AVAudioSessionPortHeadphones) | |
| { | |
| return true; | |
| } |
| // MARK: Authorized Property | |
| var audioAuthorized = Variable<Bool>(false) | |
| var videoAuthorized = Variable<Bool>(false) | |
| ----- | |
| func bind(){ | |
| // どちらも許可されたら通信開始 | |
| Observable | |
| .combineLatest(audioAuthorized.asObservable(), videoAuthorized.asObservable()) |
| let timer: Observable<Int> = Observable.interval(30.0, scheduler: MainScheduler.instance) | |
| timer | |
| .subscribe(onNext: { (notice) in | |
| // 再接続処理 | |
| if self.viewModel.chatStatus.value == LessonViewModel.ChatStatus.DisConnectedWithTutor{ | |
| self.viewModel.recallTo() | |
| } | |
| }).addDisposableTo(disposeBag) |
| class LessonViewModel { | |
| // MARK: SkyWay Connection Property | |
| fileprivate var _peer:SKWPeer? | |
| fileprivate var _mediaConnection:SKWMediaConnection? | |
| fileprivate var _dataConnection:SKWDataConnection? | |
| var remoteStream = Variable<SKWMediaStream?>(nil) | |
| var localStream = Variable<SKWMediaStream?>(nil) | |
| var chatMessages = Variable<[JSQMessage]>([]) | |
| let disposeBag = DisposeBag() |
| environment 'production' | |
| port 9000 | |
| daemonize true | |
| state_path 'tmp/pids/puma.state' | |
| pidfile 'tmp/pids/puma.pid' | |
| threads 0,16 | |
| workers 2 |
録画 https://www.youtube.com/watch?v=jgnYTbSbR7E
https://speakerdeck.com/taminif/weblioying-hui-hua-to-dong-zuo-tietukuturu-webrtckun
| // | |
| // TwicastLoginWebViewController.swift | |
| // TwicasHackathonTest | |
| // | |
| // Created by HanedaKentarou on 2017/01/16. | |
| // Copyright © 2017年 com.adriablue. All rights reserved. | |
| // | |
| /* How to use. |
| package jp.co.rarejob.views.fragments.common | |
| import android.graphics.Bitmap | |
| import android.os.Bundle | |
| import android.support.v4.app.Fragment | |
| import android.text.Editable | |
| import android.text.TextWatcher | |
| import android.util.Log | |
| import android.view.LayoutInflater | |
| import android.view.View |
| // | |
| // AnyAudioPlayer.swift | |
| // audioSample | |
| // | |
| // Created by HanedaKentarou on 2016/04/12. | |
| // Copyright © 2016年 Kaumo. All rights reserved. | |
| // | |
| import UIKit | |
| import AVFoundation |
| for subview in testButton.subviews where subview is UIButton { | |
| subview.removeFromSuperview() | |
| } |