mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 09:39:58 +00:00
Fix unused parameters
This commit is contained in:
@@ -11,8 +11,8 @@ import { Message
|
||||
const MEDIA_NAMESPACE = "urn:x-cast:com.google.cast.media";
|
||||
|
||||
export interface UpdateMessageData {
|
||||
_volumeLevel: number;
|
||||
_volumeMuted: boolean;
|
||||
_volumeLevel?: number;
|
||||
_volumeMuted?: boolean;
|
||||
_lastCurrentTime: number;
|
||||
currentTime: number;
|
||||
customData?: any;
|
||||
@@ -28,9 +28,7 @@ export default class Media {
|
||||
private channel: Channel;
|
||||
|
||||
constructor (
|
||||
sessionId: number
|
||||
, mediaSessionId: number
|
||||
, private referenceId: string
|
||||
private referenceId: string
|
||||
, private session: Session
|
||||
, private sendMessageCallback: SendMessageCallback) {
|
||||
|
||||
@@ -43,7 +41,7 @@ export default class Media {
|
||||
|
||||
const status = data.status[0];
|
||||
|
||||
const messageData = {
|
||||
const messageData: UpdateMessageData = {
|
||||
_lastCurrentTime: Date.now() / 1000
|
||||
|
||||
, currentTime: status.currentTime
|
||||
@@ -51,7 +49,7 @@ export default class Media {
|
||||
, playbackRate: status.playbackRate
|
||||
, playerState: status.playerState
|
||||
, repeatMode: status.repeatMode
|
||||
} as UpdateMessageData;
|
||||
};
|
||||
|
||||
if (status.volume) {
|
||||
messageData._volumeLevel = status.volume.level;
|
||||
|
||||
@@ -100,9 +100,7 @@ async function handleMessage (message: Message) {
|
||||
if (parentSession) {
|
||||
// Create Media
|
||||
existingMedia.set(mediaId, new Media(
|
||||
message.data.sessionId
|
||||
, message.data.mediaSessionId
|
||||
, mediaId
|
||||
mediaId
|
||||
, parentSession
|
||||
, sendMessage));
|
||||
}
|
||||
@@ -271,7 +269,7 @@ function handleMediaServerMessage (message: Message) {
|
||||
mediaServer.on("close", () => {
|
||||
sendMessage("mediaCast:/mediaServer/stopped");
|
||||
});
|
||||
mediaServer.on("error", (a) => {
|
||||
mediaServer.on("error", () => {
|
||||
sendMessage("mediaCast:/mediaServer/error");
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class ResponseTransform extends Transform {
|
||||
|
||||
public _transform (
|
||||
chunk: Message
|
||||
, encoding: string
|
||||
, _encoding: string
|
||||
// tslint:disable-next-line:ban-types
|
||||
, callback: Function) {
|
||||
|
||||
@@ -53,7 +53,7 @@ export class DecodeTransform extends Transform {
|
||||
|
||||
public _transform (
|
||||
chunk: any
|
||||
, encoding: string
|
||||
, _encoding: string
|
||||
// tslint:disable-next-line:ban-types
|
||||
, callback: Function) {
|
||||
|
||||
@@ -113,7 +113,7 @@ export class EncodeTransform extends Transform {
|
||||
|
||||
public _transform (
|
||||
chunk: any
|
||||
, encoding: string
|
||||
, _encoding: string
|
||||
// tslint:disable-next-line:ban-types
|
||||
, callback: Function) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user