草庐IT

codec_context_video

全部标签

Android context.getResources.updateConfiguration() 已弃用

就在最近context.getResources()。updateConfiguration()已在AndroidAPI25中弃用,建议使用上下文。createConfigurationContext()而是。有谁知道如何使用createConfigurationContext来覆盖android系统语言环境?在此之前由以下人员完成:Configurationconfig=getBaseContext().getResources().getConfiguration();config.setLocale(locale);context.getResources().updateCon

ios - WebRTC(iOS): local video is not getting stream on remote side

我正在尝试使用WebRTC制作一个带有音频、视频通话的应用。远程视频和音频在我的应用程序中正常工作,但我的本地流没有出现在客户端。这是我为添加视频轨道而写的letvideoSource=self.rtcPeerFactory.videoSource()letvideoCapturer=RTCCameraVideoCapturer(delegate:videoSource)guardletfrontCamera=(RTCCameraVideoCapturer.captureDevices().first{$0.position==.front}),//choosehighestresle

ios - 初始化 CBCentralManager : Type of expression is ambiguous without more context

尝试在Swift4.2项目中初始化CBCentralManager。获取评论中显示的错误:importCoreBluetoothclassSomeClass:NSObject,CBCentralManagerDelegate{//Typeofexpressionisambiguouswithoutmorecontextletmanager:CBCentralManager=CBCentralManager(delegate:self,queue:nil)//MARK:-Functions:CBCentralManagerDelegatefunccentralManagerDidUpda

ios - 不清楚的 "Type of expression is ambiguous without more context"错误

几个月后我回到我的旧XCode项目,现在我有很多以前没有的错误,我假设这与更新的语法有关。为什么我会看到:Typeofexpressionisambiguouswithoutmorecontext对于这个block@IBActionfuncsubmitUrl(sender:UIButton){varapp=UIApplication.sharedApplication().delegateas!AppDelegate//ErroroccursinbelowdeclarationofstudentDictvarstudentDict=["latitude":self.latitude,"

swift - "Type of expression is ambiguous without more context"多维数组错误

我正在尝试创建一个数组,该数组最好以这种格式存储对象[[[String,CGPoint,Bool]]],但是到处都是错误,所以我决定将其设置为[[[AnyObject]]]。这是我声明数组的代码:varsavePlayerState:[[[AnyObject]]]=[]如您所见,它是一个多维数组,我需要在其中存储3个内容:当前时间、玩家位置和一个简单的Bool。以下是我尝试将数据保存到数组的方式:savePlayerState.append([timeLabel.text,player.position,isPlayerAlive])我的错误是:Typeofexpressionisam

iOS swift : How to post a video to twitter with TwitterKit?

我还没有找到关于SO的相关和最新的答案。这是我目前正在使用的代码,所有请求都得到了正确处理,但没有发布视频?ifletuserID=Twitter.sharedInstance().sessionStore.session()?.userID{varclient=TWTRAPIClient(userID:userID)lettext:String="TestingVideo"letvideoLength:String="\(self.video.length)"print(videoLength)varinitError:NSError?varmessage=["status":tex

ios - 如何解决 "Type of expression in ambiguous without more context"?

letattributedString=NSAttributedString(data:encodedData,options:attributedOptions,documentAttributes:nil,error:nil)!编译器错误:“表达式类型不明确,没有更多上下文”怎么解决的? 最佳答案 要求[String:AnyObject]attributedOptions参数要求的格式do{letencodedData=yourEncodedString.dataUsingEncoding(NSUTF8StringEncodin

swift - "Type of expression is ambiguous without more context"尝试创建新变量以附加数组时

我是编码和Swift的新手,现在正在尝试创建一个小型应用程序。我创建了这部分代码:overridefunctableView(tableView:UITableView,didSelectRowAtIndexPathindexPath:NSIndexPath){tableView.deselectRowAtIndexPath(indexPath,animated:true)letcell=tableView.cellForRowAtIndexPath(indexPath)varselectedSubject=toBeAddedSubjects[indexPath.row]asSubje

ios - NSGenericException,原因 : [AVCapturePhotoOutput capturePhotoWithSettings:delegate:] No active and enabled video connection

我在尝试运行我的应用程序并拍摄照片时不断收到上述错误消息。我是编程新手,所以如果有人能提供帮助那就太棒了。这是我的代码importUIKitimportAVFoundationimportFirebaseclassCameraViewController:UIViewController,AVCapturePhotoCaptureDelegate,UITextViewDelegate,UITextFieldDelegate{@IBOutletweakvarcameraView:UIView!@IBOutletweakvarcancelButton:UIButton!@IBOutletw

iOS Swift : Trying to use write image buffer to construct video, 未调用 finishWritingWithCompletionHandler。输出视频包含零字节

我试图只从静态图像中写入两帧来构建视频。我一直在绕过时间参数。似乎最后一步finishWritingWithCompletionHandler从未被调用(完成写入......永远不会输出)。只创建了一个零字节.mp4视频。并且没有发生错误。不知道为什么。这是我使用的代码:funccreateBackgroundVideo(CompletionHandler:(path:String)->Void){varmaybeError:NSError?letfileMgr=NSFileManager.defaultManager()letdocDirectory=NSHomeDirectory(