Comments (12)
Hi~ Please reinstall [email protected]
use like this
<ReactJkMusicPlayer getContainer={()=> document.body}/>
// or
<ReactJkMusicPlayer getContainer={()=> document.querySelector('.element')}/>
from react-music-player.
ok i'm publish a new version later . add a option getContainer
support custom append root node
from react-music-player.
In previous version it was working fine, wherever i place markup <ReactJkMusicPlayer {...item.options} /> it render html on that node.
from react-music-player.
i'm sorry . i use import { createPortal } from "react-dom";
in 4.3.7
version to append document.body
because It will reduce some bugs
from react-music-player.
Hi~ Please reinstall
[email protected]
use like this<ReactJkMusicPlayer getContainer={()=> document.body}/> // or <ReactJkMusicPlayer getContainer={()=> document.querySelector('.element')}/>
Use like this?
<ReactJkMusicPlayer getContainer={()=> document.querySelector('.audio-wrapper')} {...item.options} />
from react-music-player.
Options will remains same as it is?
<ReactJkMusicPlayer getContainer={()=> document.querySelector('.audio-wrapper')} {...item.options} />
from react-music-player.
yes no problem . cannot work ?
from react-music-player.
Its not working, it works only one at a time,
if i use this getContainer={()=> document.querySelector('.audio-wrapper')} then {...item.options} not getting option. vice versa.
from react-music-player.
oh sorry it works, but it does not shows timers, or seekbar and player options are not working
Reference: https://www.screencast.com/t/XqqVOzNuA
from react-music-player.
What is the item.options
?
It works in my local or live demo
so i don't know your error , can not give you help , or try
<ReactJkMusicPlayer {...yourOptions} onAudioLoadError={(error)=> console.log(error)} />
from react-music-player.
Let me explain the complete scenario.
I've two player on my view and its rendering through .map function, every player have its own options, that's why i used item.options to assign every player its own options. there is no error in audio play. audio is playaing very well, but the options like seekbar not moving on audio play. timer not working.
Reference : https://www.screencast.com/t/McjkwkEFs5
Console Error: https://www.screencast.com/t/ejKxn3lFf
here is the code:
const renderMessage = (voiceMails) => {
return voiceMails.map((item, index) => {
item.options = {
className: "audio-player",
defaultPlayIndex: 0,
theme: "light",
glassBg: false,
defaultPosition: {},
openText: "Open",
closeText: "Close",
mode: "full",
once: true,
autoPlay: false,
toggleMode: false,
showMiniModeCover: false,
showMiniProcessBar: false,
drag: true,
seeked: true,
showProgressLoadBar: false,
showPlay: true,
showReload: false,
showDownload: false,
showPlayMode: false,
showThemeSwitch: true,
showLyric: false,
extendsContent: [],
defaultVolume: 100,
onAudioEnded(audioInfo) {
//console.log("audio ended", audioInfo);
readHandler(item.fromNumber, item.recordingSid)
},
onAudioSeeked(audioInfo) {
console.log("audio seeked", audioInfo);
},
audioLists: [
{
musicSrc: () => {
return Promise.resolve(item.recordingMp3Uri)
}
},
]
};
return (
<div className={"col-12 col-md-12 col-lg-10 col-xl-7"} key={index}>
<div className="audio-wrap">
<div className="audio-ply" id={"player-" + index}>
<ReactJkMusicPlayer {...item.options} onAudioLoadError={(error)=> console.log(error)} getContainer={()=> document.querySelector('#player-' + index)} />
</div>
</div>
</div>
)
})
}
from react-music-player.
@lijinke666 any solution.
from react-music-player.
Related Issues (20)
- Play by index zero is not working
- Responsive is not working
- Is there a way to stop rotating image? HOT 1
- UNSAFE_componentWillReceiveProps error in strict mode HOT 1
- Songs restarting mid song
- AIFC Audio File Format Support
- How can i modify the default green color of the player?
- Property "remember: true," is not working.
- error - TypeError: _sortablejs.Swap is not a constructor HOT 4
- Mobile - only One UI Samsung - Need to touch multiple times to open main player from mini player
- Click delete audio lists, don't want to stop current playing track HOT 1
- 移动端页面音量调节支持?
- 写的啥啊
- NextJS HOT 4
- Disable Drag and Drop on Playlist HOT 3
- Unable to install (npm & yarn) HOT 2
- Media session does not load image
- Got this error : Cannot set properties of null (setting 'Sortable1685030262830') TypeError: Cannot set properties of null (setting 'Sortable1685030262830') HOT 3
- error in next Js 13 HOT 3
- Giving a null issue onDestroy
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 react-music-player.