Comments (8)
@leandroalonso I think we can close this one now that it is merged. Thanks!
from pocket-casts-ios.
@rviljoen I agree with your reasoning and ignoring the playbackSpeed
.
from pocket-casts-ios.
User added:
It also seems to work properly if you create a Shortcut called "Play My Podcasts" and add the "Resume Current Episode" action from Pocket Casts.
from pocket-casts-ios.
Another report in 5595387-zen, but with the Shortcut app.
UUID for logs: 88705105-78AA-4CB2-B016-B6E760584B3D
App Version: 7.22
Device: iPhone13,4
OS: 16.0
from pocket-casts-ios.
Another report in 5739926-zen
App Version: 7.26
Device: iPhone14,2
OS: 16.1.1
from pocket-casts-ios.
Once I ask Siri to play PocketCast It will reset the speed of the podcast from 1.6 to 1.
Is there any workaround?
5879165-zen
Version 7.29
Device: iPhone13,3
OS: 16.2
from pocket-casts-ios.
The code for DefaultPlayer already references code to handle a similar problem:
pocket-casts-ios/podcasts/DefaultPlayer.swift
Lines 521 to 528 in 22f3fe2
Need to investigate if the code is working as intended in DefaultPlayer
and if a similar issue may exist in EffectsPlayer
, which does not seem to have the same safeguard built in.
from pocket-casts-ios.
I dug a bit more and documenting my findings to date:
-
This happens using both
DefaultPlayer
andEffectsPlayer
-
When asking Siri to "Resume Pocket Casts" or "Play Pocket Casts" it calls the app via
MPRemoteCommandCenter
:
pocket-casts-ios/podcasts/PlaybackManager.swift
Line 1416 in 247c730
-
When asking Siri to "Play my podcasts" it does so via Siri intents. This explains the different behaviour between the different Siri commands, as logged in the original report.
pocket-casts-ios/podcasts/AppDelelgate+SiriShortcuts.swift
Lines 122 to 131 in 247c730
-
When registering the Siri intent, we do not set a playback speed:
{
playShuffled = 0;
mediaContainer = <null>;
playbackRepeatMode = one;
mediaItems = (
<INMediaItem: 0x2826d7e80> {
artist = <null>;
topics = <null>;
privateMediaItemValueData = <null>;
title = Resuming Current Episode;
identifier = Resume ID;
type = 7;
artwork = <_INBundleImage: 0x2826d7ed0>;
namedEntities = <null>;
},
);
resumePlayback = 1;
playbackQueueLocation = unknown;
playbackSpeed = <null>;
}
- But when the app is called, iOS does pass along a default playback speed of 1:
{
playShuffled = 0;
mediaContainer = <INMediaItem: 0x28266d130> {
artist = <null>;
topics = <null>;
privateMediaItemValueData = <null>;
title = <null>;
identifier = library;
type = 0;
artwork = <null>;
namedEntities = <null>;
};
playbackRepeatMode = none;
mediaItems = (
<INMediaItem: 0x28266d680> {
artist = <null>;
topics = <null>;
privateMediaItemValueData = <null>;
title = ;
identifier = Resume ID;
type = 7;
artwork = <null>;
namedEntities = <null>;
},
);
resumePlayback = 1;
playbackQueueLocation = now;
playbackSpeed = 1;
}
I assume the speed is sent to cater for commands like "Play my podcasts at double speed" or "Play my podcasts at normal speed". Unfortunately Apple sends 1 as the speed even if the user did not specify any speed. We then set the speed accordingly while ignoring the current speed of the player:
pocket-casts-ios/podcasts/AppDelelgate+SiriShortcuts.swift
Lines 154 to 160 in 247c730
It would be ideal if Apple only passed 1 as the speed if the user explicitly asked for the supported "normal speed". In the interim, we may have to work around this by ignoring the speed setting when 1 is passed along, similar to what DefaultPlayer
is doing here for a different, but similar, case:
pocket-casts-ios/podcasts/DefaultPlayer.swift
Lines 521 to 527 in 247c730
My sense is that we should ignore the intent playbackSpeed
if it is 1. This is not ideal, but the only workaround until Apple changes the API to consider the current playing speed before passing a value to us via the intent.
@emilylaguna @leandroalonso keen to hear your views on this one.
from pocket-casts-ios.
Related Issues (20)
- Apple Watch: Complication Icon does not load HOT 9
- Reorder the most popular categories shown in the pills in Discover HOT 1
- Refine pills animation in Discover HOT 2
- Remove code related to the isPaid feature HOT 2
- Search: tapping Discover/Podcasts with the search open should dismiss it
- Navigating doesn't work when using multiple windows on iPad
- Unable to play bookmark when podcast unsubscribed and listening history removed
- Discover: Subscribe button is not getting updated in category view HOT 4
- New grid layout spacing can go off-screen
- UI tweaks to the new episode badges
- Add a drop-shadow to the white-background podcasts in the new grids
- Unable to install dependencies to build the project HOT 1
- Add default remote keys for all feature flags HOT 4
- Add Developer Menu option for switching between Production and Staging
- Queries: move it out of Main Thread
- Tweak play button size in new mini player
- Mini-Player dissapears when rotatin on iPad after openning mini-player in full-screen
- Add code to update any pending Auto-Download status depending of streaming download status.
- Downloading streaming episodes with AVExportSession
- New grid UI tweaks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pocket-casts-ios.