stream_type = models.CharField(_('Streaming type'),
choices=streaming_choices, max_length=32)
streaming = models.BooleanField(_('streaming'))
+ video_id = models.IntegerField(
+ _('video id'),
+ blank=True,
+ null=True
+ )
@property
def slug(self):
if self.conference:
- return self.conference.slug
+ if self.video_id:
+ return self.conference.slug + '_' + self.video_id
+ else:
+ return self.conference.slug
else:
return 'None'
settings, "TELECASTER_LIVE_STREAMING_PROTOCOL", 'http')
server_type = stream['server_type']
stream_type = stream['stream_type']
+
if server_type == 'icecast':
port = getattr(
settings, "TELECASTER_LIVE_ICECAST_STREAMING_PORT", '8000')
settings, "TELECASTER_LIVE_STREAM_M_STREAMING_PORT", '8080')
path = getattr(
settings, "TELECASTER_LIVE_STREAM_M_STREAMING_PATH", '/')
- #site = Site.objects.all()[0]
+
+ if "video_id" in stream:
+ video_id = stream['video_id']
+ else:
+ video_id = None
+
server, c = StreamingServer.objects.get_or_create(
protocol=protocol,
host=host,
port=port,
path=path,
type=server_type)
+
stream = LiveStream(conference=conference, server=server,
- stream_type=stream_type, streaming=True)
+ stream_type=stream_type, streaming=True,
+ video_id=video_id)
stream.save()
if not conference.web_class_group and settings.TELECASTER_LIVE_TWEETER: