Broadcaster pages

Please check partitipant.js, maybe you have some suggestions on how to re-factor it.
How can we refactor the broadcaster part to broadcaster.js file, participant to participant.js file?
Is there common part?