Server and terminal
A server includes a relay unit adapted to transmit a video data related to a livestream from a terminal of a livestreamer of the livestream to a terminal of a viewer, a determination unit adapted to determine whether the livestream has been terminated for an unexpected reason, a maintaining unit adapted to maintain a state of the livestream when it is determined that the livestream has been terminated, and a resume unit adapted to resume the livestream with the maintained state when the resume unit receives an instruction to resume the livestream from the terminal of the livestreamer within a predetermined period after it is determined that the livestream has been terminated.
1 . A server, comprising:
a processor;
a network communication interface connected to a network; and
a storage medium that stores a program, wherein
when the processor executes the program, the processor is configured to:
cause the network communication interface to transmit a video data related to a livestream from a terminal of a livestreamer of the livestream to a terminal of a viewer via the network;
cause the network communication interface to receive, over the network and from the terminal of the livestreamer, a keep-alive signal that is generated at the terminal of the livestreamer at certain intervals during the livestream;
increment a counter every unit period; and
reset a counter value of the counter when the keep-alive signal is received from the terminal of the livestreamer by the network communication interface,
wherein the processor is further configured to change a status of the livestream from a first status to a second status when the network communication interface fails to receive the keep-alive signal and to change the status of the livestream from the second status to the first status when the keep-alive signal is recovered.
2 . The server according to claim 1 , wherein
the processor is further configured to, change the status of the live stream from the second status to a third status when the counter value reaches a threshold.
3 . A server, comprising:
a processor;
a network communication interface connected to a network; and
a storage medium that stores a program, wherein
when the processor executes the program, the processor is configured to:
cause the network communication interface to transmit a video data related to a livestream from a terminal of a livestreamer of the livestream to a terminal of a viewer via the network;
cause the network communication interface to receive, over the network and from the terminal of the livestreamer, a keep-alive signal that is generated at the terminal of the livestreamer at certain intervals during the livestream;
increment a counter every unit period; and
reset a counter value of the counter when the keep-alive signal is received from the terminal of the livestreamer by the network communication interface,
wherein the processor is further configured to start a countdown timer when the counter value reaches a threshold, and to terminate the livestream when the countdown timer reaches a lower limit, terminate the livestream.
4 . A method, including:
transmitting a video data related to a livestream from a terminal of a livestreamer of the livestream to a terminal of a viewer;
receiving, over a network and from the terminal of the livestreamer, a keep-alive signal that is generated at the terminal of the livestreamer at certain intervals during the livestream;
setting a counter to increment every unit period;
resetting a counter value of the counter when the keep-alive signal is received from the terminal of the livestreamer; and
changing a status of the livestream from a first status to a second status when there is a failure to receive the keep-alive signal and changing the status of the livestream from the second status to the first status when the keep-alive signal is recovered.