Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Fix crash #12

Merged
merged 9 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/TrackPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class TrackPlayer extends EventEmitter{
async start(){
if(!await this.load_streams() || !this.player) /* destroy could have been called while waiting */
return;
if(this.normalize_volume)
if(this.normalize_volume && this.stream.volume)
this.player.setVolume(this.stream.volume);
try{
this.player.setURL(this.stream.url, this.stream.is_file);
Expand Down
3 changes: 2 additions & 1 deletion src/api/Youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const api = new class YoutubeAPI{
constructor(){
this.innertube_client = {
clientName: 'WEB',
clientVersion: '2.20220331.06.00',
clientVersion: '2.20220918',
gl: 'US',
hl: 'en'
};
Expand All @@ -284,6 +284,7 @@ const api = new class YoutubeAPI{
options.headers.origin = `https://${origin}.youtube.com`;

if(path == 'player'){
body.params = '2AMBCgIQBg';
body.contentCheckOk = true;
body.racyCheckOk = true;
body.context.client.clientName = 'ANDROID';
Expand Down