Twitter has launched an in-app audio streaming service that will allow users to play music or podcasts directly from their timelines, in the hope that users will spend more time on its service.
The social media site unveiled the "Audio Card" feature on Thursday, which will allows people click on a tweet with a song in it and listen to it while continuing to browse the app.
Audio Card was made in partnership with Germany audio streaming service SoundCloud. Users can listen to audio files from some of SoundCloud's partners that tweet such as music by popular DJ David Guetta or podcasts from the White House.
Twitter has struggled with slowing user growth and engagement which has concerned investors. Shares in the San Francisco-based company are down over 24 percent this year. But the microblogging site has been introducing services to keep eyeballs on its app for longer. Earlier this year it tested a "buy now" button to allow users to buy products directly from a tweet.
"With this, it is again another service aimed to keep people engaged within the app," Jack Kent, senior mobile analyst at IHS, told CNBC by phone.
"In broadening out the content, they hope people will stay in the Twitter environment."
Twitter has also got iTunes on board so users can listen to music in their timeline then be transferred to Apple's service to buy the song. Rock band the Foo Fighters officially launched their new single "Something From Nothing" on Audio Card.
"We're just beginning to test the Audio Card and plan to make it available to more partners and creators in the future so that many more musical artists and creators will be able to share exclusive, in-the-moment audio to millions of listeners on Twitter," the company said in a blog post.
This is not Twitter's first foray into the music space. Last year, it released a standalone app known as #Music aimed to help users discover songs by harnessing tweets around particular artists and tracks. The app was officially pulled in March due to lack of demand.
"Audio Card is much better, there are tweets the timeline so don't need to use a different app and you can dock the music as you use Twitter," Sam Gee, senior technology analyst at Mintel, said in a phone interview.
Music streaming is a hotly contested space. Google recently its video-streaming service YouTube will offer a subscription based music-streaming service.
But Google will need to make sure the new feature does not alienate its core audience and the range of content is wide enough to appeal to users.
"The big challenge will be for it to have a wide range of content. Also it wants to make sure it doesn't disturb the service or alienated the core users from the Twitter experience, it is a balancing act," Kent said.