mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added a play command
This commit is contained in:
parent
8caa7a91e3
commit
1e450d45a2
3 changed files with 13 additions and 3 deletions
|
@ -40,7 +40,7 @@
|
||||||
views.push({ name: "TV Shows", url: "tvrecommended.html", img: "css/images/items/list/collection.png", background: "#FF870F" });
|
views.push({ name: "TV Shows", url: "tvrecommended.html", img: "css/images/items/list/collection.png", background: "#FF870F" });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (counts.SongCount) {
|
if (counts.SongCount || counts.MusicVideoCount) {
|
||||||
views.push({ name: "Music", url: "musicrecommended.html", img: "css/images/items/list/audiocollection.png", background: "#6FBD45" });
|
views.push({ name: "Music", url: "musicrecommended.html", img: "css/images/items/list/audiocollection.png", background: "#6FBD45" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
|
|
||||||
var newPositionTicks = (newPercent / 100) * currentItem.RunTimeTicks;
|
var newPositionTicks = (newPercent / 100) * currentItem.RunTimeTicks;
|
||||||
|
|
||||||
changeStream(newPositionTicks);
|
changeStream(Math.floor(newPositionTicks));
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
@ -1111,7 +1111,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.BitRate) {
|
if (stream.BitRate) {
|
||||||
options.push((parseInt(stream.BitRate / 1000)) + ' kbps');
|
options.push((Math.floor(stream.BitRate / 1000)) + ' kbps');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Channels) {
|
if (stream.Channels) {
|
||||||
|
|
|
@ -883,7 +883,17 @@ var Dashboard = {
|
||||||
}
|
}
|
||||||
else if (msg.MessageType === "Play") {
|
else if (msg.MessageType === "Play") {
|
||||||
|
|
||||||
|
ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
||||||
|
|
||||||
|
Ids: msg.Data.ItemIds.join(','),
|
||||||
|
|
||||||
|
Fields: 'MediaStreams,UserData,DisplayMediaType,SeriesInfo,AudioInfo,Chapters'
|
||||||
|
|
||||||
|
}).done(function(result) {
|
||||||
|
|
||||||
|
MediaPlayer.play(result.Items, msg.Data.StartPositionTicks);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (msg.MessageType === "UpdatePlaystate") {
|
else if (msg.MessageType === "UpdatePlaystate") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue