function parsePlaybackFinishedPayload(payload) {
  let raw = {};
  try {
    const parsed = JSON.parse(payload);
    if (typeof parsed === "object" && parsed !== null) {
      raw = parsed;
    }
  } catch {
  }
  const rawPosition = raw.playback_position ?? raw.playbackPosition;
  const playbackPosition = typeof rawPosition === "number" && Number.isFinite(rawPosition) ? rawPosition : 0;
  const rawTranscript = raw.synchronized_transcript ?? raw.synchronizedTranscript;
  const synchronizedTranscript = typeof rawTranscript === "string" ? rawTranscript : void 0;
  const interrupted = typeof raw.interrupted === "boolean" ? raw.interrupted : false;
  return {
    playbackPosition,
    interrupted,
    synchronizedTranscript
  };
}
export {
  parsePlaybackFinishedPayload
};
//# sourceMappingURL=playback_payload.js.map