Vimeo API - setVolume has stopped working - vimeo-api

Until earlier today, the following block of code was running fine to toggle the volume on a Vimeo video.
const updateVideoMute = (vimeoPlayer, muteIcon) => {
vimeoPlayer.getVolume().then(data => {
data === 0 ? vimeoPlayer.setVolume(1) : vimeoPlayer.setVolume(0);
data === 0 ? muteIcon.classList.add("active") : muteIcon.classList.remove("active");
});
};
The checks I have made include:
Testing other videos from same library (volume has stopped toggling);
Clearing cache;
Testing other browsers;
Double checked the player and methods are behaving as expected.
Has something changed with the API? Any suggestions on how to further investigate the problem?
Appreciate your help.

I had this same issue, and changing player.setVolume(1) to use player.setMuted(false) instead has made it work for me.

Related

Unable to save video anymore with Expo on iOS

I have an Expo App (iOS/Android) that allow the user to record short videos (and pictures) and share them (among other things). It worked fine on both OSes for a while, but recently it stopped working on iOS (Android still working fine). Picture taking works fine on both devices.
Here is the code that used to work when trying to save said video :
const recordPromise = this.camera.recordAsync({
maxDuration: 5,
quality: Camera.Constants.VideoQuality["720p"],
});
const videoData = await recordPromise;
let asset = await MediaLibrary.createAssetAsync(videoData.uri);
The following error is raised on createAssetAsync() :
[Unhandled promise rejection: Error: Asset couldn't be saved to photo library]
Recording itself seems to be fine (uri has been anonymized) :
Object {
"uri": "file:///var/mobile/Containers/Data/Application/00000000-0000-0000-0000-000000000000/Library/Caches/ExponentExperienceData/%2540app%252Fapp/Camera/0F46F276-DCBE-4999-A3E0-0E10955467AF.mov",
}
Permissions are requested in componentDidMount and had been granted :
const permissionCamera = await Camera.requestPermissionsAsync();
const permissionLibrary = await MediaLibrary.requestPermissionsAsync();
const permissionMicro = await Camera.requestMicrophonePermissionsAsync();
When checking the permissions for Expo Go in the settings, they are properly allowed.
MediaLibrary.getPermissionsAsync(); returns :
{
"accessPrivileges": "all",
"canAskAgain": true,
"expires": "never",
"granted": true,
"status": "granted",
}
Same code worked perfectly a couple weeks ago, and is still working fine on Android. I thought that it was an Apple-related change, but found nothing in the documentation or internet.
Expo CLI version is 4.10.1, SDK 42, iOS is 14.8 but the issue has been witnessed on multiple different devices.
Expo Go is up to date, I even uninstalled Expo Go and reinstalled it just in case. Didn't tried that failing version in testflight (some account stuff that needs to be handled with Apple before we can publish anything again), but I need this to work again in expo go anyway.
Nothing in that file has been changed for almost 120 days.
I made a bare app that reproduce the same issue. Code can be found here : https://github.com/sebastien-f/expo-test-video
Issue is create by camera.recordAsync() that stops almost as soon as it starts. Only happens when the quality prop is used. For now, I've removed the parameter and opened an issue on Github : https://github.com/expo/expo/issues/14432

Next.js CLI - is it possible to pre-build certain routes when running dev locally?

I'm part of an org with an enterprise app built on Next.js, and as it's grown the local dev experience has been degrading. The main issue is that our pages make several calls to /api routes on load, and those are built lazily when you run yarn dev, so you're always forced to sit and wait in the browser while that happens.
I've been thinking it might be better if we were able to actually pre-build all of the /api routes right away when yarn dev is run, so we'd get a better experience when the browser is opened. I've looked at the CLI docs but it seems the only options for dev are -p (port) and -H (host). I also don't think running yarn build first will work as I assume the build output is quite different between the build and dev commands.
Does anyone know if this is possible? Any help is appreciated, thank you!
I don't believe there's a way to prebuild them, but you can tell Next how long to keep them before discarding and rebuilding. Check out the onDemandEntries docs. We had a similar issue and solved it for a big project about a year ago with this in our next.config.js:
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants")
module.exports = (phase, {}) => {
let devOnDemandEntries = {}
if (phase === PHASE_DEVELOPMENT_SERVER) {
devOnDemandEntries = {
// period (in ms) where the server will keep pages in the buffer
maxInactiveAge: 300 * 1000,
// number of pages that should be kept simultaneously without being disposed
pagesBufferLength: 5,
}
}
return {
onDemandEntries,
...
}
}

Play Framework WS.url stuck forever

I've been banging my head against the wall debugging a production issue which I managed to downsize to the following side-test:
def test = Action.async { request =>
WS.url("https://linklyapp.com/pricing?utm_content=buffer2f4a8&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer")
.withRequestTimeout(3000)
.withFollowRedirects(false)
.get
.map { response =>
Logger.debug("Got a response")
Ok(response.body)
}
.recover {
case e : Throwable =>
Logger.error("error", e)
BadRequest("Couldn't open")
}
}
For some reason this never returns.
I don't see the debug print or the error. A timeout is set. I also tried setting the timeout via configuration. No difference.
Any suggestions?
Turns out this is an issue in the async-http-client used in Play.
(https://github.com/playframework/playframework/issues/2767)
I upgraded to async-http-client 1.8.14 and it solved the problem. (The newest version of Play Framework - 2.3.5 - Uses v1.8.8 in which the problem still exists).
Edit:
Play Framework 2.3.5 uses async-http-client 1.8.14. Turns out the dependency for 1.8.8 was coming from ReactiveCouchbase.
See more details here in an issue I submitted:
https://github.com/playframework/playframework/issues/3540

Time out when calling a Web service

I have a problem when I am using the webservice from a mobile App Im developing in Flex Builder.
I have the following code for a Web service
<s:CallResponder id="readAllPedidosErpResult" result="readAllPedidosErpResult_resultHandler(event)" fault="sincFailResult_faultHandler(event)"/>
protected function readAllPedidosErp():void
{
readAllPedidosErpResult.token = xEasyERPMobileAppWS.readAllPedidosErp
(readFechaSincronizacionPedidoErp(),sC.readComercialUsuario());
}
protected function readAllPedidosErpResult_resultHandler(event:ResultEvent):void
{
var result:ArrayCollection;
var c:PedidoWSMobile;
if(event.token.result is ArrayCollection)
{
result = event.token.result as ArrayCollection;
if(result!=null)
{
//DO SOMETHING
}
}
continueToNext(15);
}
The problem I get is that xEasyERPMobileAppWS.readAllPedidosErp(readFechaSincronizacionPedidoErp(),sC.readComercialUsuario()); takes almost 2 minutes to get the answer but after 30 seconds (more or less) does not wait more and I got a fault (sincFailResult_faultHandler(event)).
How can I give more time to the CallResponder to wait the answer from the Web Service I am calling?
Thanks in advance.
I´ve just found the solution in another thread.
FYI: Adobe Flex 4.6 WebService request timeout
Thanks anyways!

c# app connectivity issue

I am new to C# and would be really grateful if someone could provide some insight on the following problem: I have written a c# app that gets the html content of a website, quite simply using a webclient. The problem is that if I run it for multiple websites I see that sometimes I get no results for some of them, like it was never connected to that website at that instance. I initially thought it was my internet connection but the same happened when I tried on a different wifi. It is worth mentioning that I have the same prob on another of my appcs when trying to connect to a webservice. My question is: does anybody know how can this be fixed? Does it have to do with the timeout time of something like that?
Thank you very much in advance
This is the code but it's not really an issue of coding:
var client = new WebClient();
try
{
var htmlcode = client.DownloadString(site);
int NumberOfTrues = Regex.Matches(htmlcode.ToLower(), key).Count;
}
catch (Exception)
{
messagebox.show("could not be loaded");
}
This was solved by defining the default proxy server in app config.